We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 946b17f commit 6510b17Copy full SHA for 6510b17
‎Beginner_Level_Python_programs/Leap_year.py
@@ -0,0 +1,17 @@
1
+# Python program to check if year is a leap year or not
2
+
3
+year = 2000
4
5
+# To get year (integer input) from the user
6
+# year = int(input("Enter a year: "))
7
8
+if (year % 4) == 0:
9
+ if (year % 100) == 0:
10
+ if (year % 400) == 0:
11
+ print("{0} is a leap year".format(year))
12
+ else:
13
+ print("{0} is not a leap year".format(year))
14
15
16
+else:
17
0 commit comments