Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def checkLeapYear(year):
- if (year % 4 != 0): #if (year is not divisible by 4) then (it is a common year)
- return False
- elif (year % 100 != 0): #else if (year is not divisible by 100) then (it is a leap year)
- return True
- elif (year % 400 != 0): #else if (year is not divisible by 400) then (it is a common year)
- return False
- else: #else (it is a leap year)
- return True
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement