From 72a96e34dbdb6f47120b9c000f90d07ad950b751 Mon Sep 17 00:00:00 2001 From: ns9137625751 <72907070+ns9137625751@users.noreply.github.com> Date: Sat, 2 Oct 2021 13:40:52 +0530 Subject: [PATCH] Create Python Program to Check Leap Year --- Python Program to Check Leap Year | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Python Program to Check Leap Year diff --git a/Python Program to Check Leap Year b/Python Program to Check Leap Year new file mode 100644 index 0000000..1e77391 --- /dev/null +++ b/Python Program to Check Leap Year @@ -0,0 +1,17 @@ +# Python program to check if year is a leap year or not + +year = 2000 + +# To get year (integer input) from the user +# year = int(input("Enter a year: ")) + +if (year % 4) == 0: + if (year % 100) == 0: + if (year % 400) == 0: + print("{0} is a leap year".format(year)) + else: + print("{0} is not a leap year".format(year)) + else: + print("{0} is a leap year".format(year)) +else: + print("{0} is not a leap year".format(year))