Skip to content

Commit 39284a5

Browse files
authored
Add is_leap function to check leap years
1 parent 38909d4 commit 39284a5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

myleap.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
"""A simple module."""
2+
3+
4+
def is_leap(yy):
5+
"""Functin to check given year is leap or not."""
6+
return yy % 400 == 0 or (yy % 4 == 0 and yy % 100 != 0)

0 commit comments

Comments
 (0)