Skip to content

Commit 47e6a3a

Browse files
committed
leap year
1 parent e6bfd0d commit 47e6a3a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

exam1/gregorian_cal_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,7 @@ def is_leap_year(year: int) -> bool:
55
:param year: an integer indicating a year.
66
:return: A boolean indicating whether or not the year parameter is a leap year.
77
"""
8+
if year%4==0 and (year%400==0 or year%100!=0):
9+
return True
10+
return False
811
pass # implement me

0 commit comments

Comments
 (0)