From 2e4da3baca1ee3024021b3bf1f2433436a0f17d0 Mon Sep 17 00:00:00 2001 From: Shuyang Ma <86862962+Peterhungchien@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:55:24 +0000 Subject: [PATCH] Complete leap.py --- leap/leap.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/leap/leap.py b/leap/leap.py index 50fd034..df887f5 100644 --- a/leap/leap.py +++ b/leap/leap.py @@ -1,2 +1,9 @@ def leap_year(year): - pass + if year % 400 == 0: + return True + elif year % 100 == 0: + return False + elif year % 4 == 0: + return True + else: + return False \ No newline at end of file