You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
248 B
Python
11 lines
248 B
Python
5 years ago
|
def leap_year(y):
|
||
|
if y % 400 == 0:
|
||
|
return True
|
||
|
if y % 100 == 0:
|
||
|
return False
|
||
|
if y % 4 == 0:
|
||
|
return True
|
||
|
else:
|
||
|
return False
|
||
|
print(leap_year(1900))
|
||
|
print(leap_year(2004))
|