From 7b3acce24b27195121be8e5a4efb7f9cdccb67ed Mon Sep 17 00:00:00 2001 From: Shetty Anish <55327327+shettyAnish@users.noreply.github.com> Date: Sun, 4 Oct 2020 10:08:16 +0530 Subject: [PATCH] Create Check Leap Year using Python program to Check Leap Year using Python --- Check Leap Year using Python | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Check Leap Year using Python diff --git a/Check Leap Year using Python b/Check Leap Year using Python new file mode 100644 index 0000000000..8061a132cd --- /dev/null +++ b/Check Leap Year using Python @@ -0,0 +1,23 @@ +yr=int(input('enter year')) +if yr%100==0: #century year + if yr%400==0: + print ('{} is leap year'.format(yr)) + else: + print ('{} is not leap year'.format(yr)) +else: + if yr%4==0: + print ('{} is leap year'.format(yr)) +else: + print ('{} is not leap year'.format(yr)) +Sample Output: + +enter year2012 +2012 is leap year + +enter year2018 +2018 is not leap year + +2000 is leap year + +enter year1900 +1900 is not leap year