From c5fd9dfaae4c507365670060f3696f6d3dd93e99 Mon Sep 17 00:00:00 2001 From: sanghwaahn Date: Tue, 24 Sep 2024 15:11:28 +0000 Subject: [PATCH] Complet leap.py --- leap/leap.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/leap/leap.py b/leap/leap.py index 50fd034..ca9a65a 100644 --- a/leap/leap.py +++ b/leap/leap.py @@ -1,2 +1,23 @@ 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 + +print(leap_year(1999)) + #pass +# ctrl-j +# cd leap +# python3 leap.py +# python3 -i leap.py +# + + + +## My Exercise +# exit() or quit() +# q to return \ No newline at end of file