Created
February 3, 2019 21:29
-
-
Save PierraKimathi-zz/40f351151c969cfb953df734e08f9205 to your computer and use it in GitHub Desktop.
Determining if a number is leap or not
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 isLeapYear(year): | |
if year % 100 == 0: | |
if year % 400 == 0 and year % 4 == 0: | |
return True | |
return False | |
elif year % 4 == 0: | |
return True | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment