Open psurabh opened 6 months ago
[!TIP] I can email you next time I complete a pull request if you set up your email
The sandbox appears to be unavailable or down.
I found the following snippets in your repository. I will now analyze these snippets and come up with a plan.
leap_year.py
✓ https://github.com/psurabh/build_tools/commit/4b939642ddaa3f24f7fe2369a9be613b57b3e67a Edit
Create leap_year.py with contents:
• Create a new Python file named "leap_year.py".
• In this file, define a function named "is_leap_year" that takes an integer argument "year".
• The function should return True if "year" is a leap year and False otherwise.
• Implement the leap year rules as follows: a year is a leap year if it is divisible by 4, but not divisible by 100 unless it is also divisible by 400. This can be done using the modulus operator (%) in Python to check for divisibility.
• After the function definition, add a main block that prompts the user for a year, calls the "is_leap_year" function with the user's input, and prints whether the input year is a leap year.
leap_year.py
✓ Edit
Check leap_year.py with contents:
Ran GitHub Actions for 4b939642ddaa3f24f7fe2369a9be613b57b3e67a:
I have finished reviewing the code for completeness. I did not find errors for sweep/write_a_program_for_leap_year_in_python
.
💡 To recreate the pull request edit the issue title or description.Something wrong? [Let us know].
This is an automated message generated by Mi6
Checklist
- [X] Create `leap_year.py` ✓ https://github.com/psurabh/build_tools/commit/4b939642ddaa3f24f7fe2369a9be613b57b3e67a [Edit](https://github.com/psurabh/build_tools/edit/sweep/write_a_program_for_leap_year_in_python/leap_year.py) - [X] Running GitHub Actions for `leap_year.py` ✓ [Edit](https://github.com/psurabh/build_tools/edit/sweep/write_a_program_for_leap_year_in_python/leap_year.py)