Skip to content

Instantly share code, notes, and snippets.

@PierraKimathi-zz
Created February 3, 2019 21:29
Show Gist options
  • Save PierraKimathi-zz/40f351151c969cfb953df734e08f9205 to your computer and use it in GitHub Desktop.
Save PierraKimathi-zz/40f351151c969cfb953df734e08f9205 to your computer and use it in GitHub Desktop.
Determining if a number is leap or not
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