Skip to content

Commit 2896619

Browse files
authored
Merge pull request #260 from shreyanshsingh2107/master
Check Leap Year
2 parents 0bc276d + 7faa8e2 commit 2896619

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Python/Leap_year.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
year = int(input("Enter a year: "))
2+
3+
if (year % 4) == 0:
4+
if (year % 100) == 0:
5+
if (year % 400) == 0:
6+
print("{0} is a leap year".format(year))
7+
else:
8+
print("{0} is not a leap year".format(year))
9+
else:
10+
print("{0} is a leap year".format(year))
11+
else:
12+
print("{0} is not a leap year".format(year))

0 commit comments

Comments
 (0)