Last active
October 7, 2018 10:13
-
-
Save anuragrana/bf2537be087ffec639e787b20ab0c1a7 to your computer and use it in GitHub Desktop.
This file contains 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
# | |
# Program to confirm is a given year is leap year or not | |
# year is provided at runtime. | |
# Author: https://www.pythoncircle.com | |
# | |
def is_leap(year): | |
leap = False | |
if year % 4 == 0: | |
if year % 100 == 0: | |
if year % 400 == 0: | |
return True | |
return False | |
return True | |
else: | |
return False | |
return leap | |
if __name__ == '__main__': | |
print(is_leap(int(input()))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment