This pull request includes changes to the leap_year.py script. A new function validate_input(input) has been added to check if the user input is an integer or a string. If the input is an integer, it is then checked if it is a leap year or not.
Summary
Added a new function validate_input(input) in leap_year.py to validate if the user input is an integer or a string.
If the input is an integer, the function is_leap_year(year) is called to check if it is a leap year.
The type of the input and the result of the leap year check are printed.
Fixes #15.
🎉 Latest improvements to Mi6:
#
💡 To get Mi6 to edit this pull request, you can:
Comment below, and MI6 can edit the entire PR
Comment on a file, Mi6 will only modify the commented file
Edit the original issue to get Mi6 to recreate the PR from scratch
Description
This pull request includes changes to the
leap_year.py
script. A new functionvalidate_input(input)
has been added to check if the user input is an integer or a string. If the input is an integer, it is then checked if it is a leap year or not.Summary
validate_input(input)
inleap_year.py
to validate if the user input is an integer or a string.is_leap_year(year)
is called to check if it is a leap year.Fixes #15.
🎉 Latest improvements to Mi6:
#💡 To get Mi6 to edit this pull request, you can: