RosettaCodeData/Task/Leap-year/Python/leap-year-2.py

5 lines
104 B
Python
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
def is_leap_year(year):
if year % 100 == 0:
return year % 400 == 0
return year % 4 == 0