From 08138eba4400fd85e52ad42c81c640fc83e26256 Mon Sep 17 00:00:00 2001 From: Anukaal Date: Sat, 2 Oct 2021 19:02:02 +0530 Subject: [PATCH] added python file --- leap_year.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 leap_year.py diff --git a/leap_year.py b/leap_year.py new file mode 100644 index 0000000..5289d08 --- /dev/null +++ b/leap_year.py @@ -0,0 +1,10 @@ +def is_leap(year): + leap = False + + # Write your logic here + return(year%400==0) or ((year%4==0) and (year%100!=0)) + + return leap + +year = int(input()) +print(is_leap(year))