Created
February 16, 2022 17:45
-
-
Save SiddharthManthan/913dac9cbe362280d961ca9078cc66ad to your computer and use it in GitHub Desktop.
Find leap year
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def leap_year(year): | |
if year % 4 == 0: | |
if year % 100 == 0: | |
if year % 400 == 0: | |
print("It's a leap year.") | |
else: | |
print("It's not a leap year.") | |
else: | |
print("It's a leap year.") | |
year = int(input("Enter Year : ")) | |
leap_year(year) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment