Skip to content

Commit a40b0da

Browse files
author
codehouseindia
authored
Merge pull request codehouseindia#287 from KumarLokesh15/patch-1
Create Leap year
2 parents feddf83 + d889d7d commit a40b0da

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Leap year

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# https://www.facebook.com/permalink.php?story_fbid=1686144611554028&id=100004755164847
2+
# subscribed by Lokesh Kumar
3+
4+
5+
# Python program to check leap year or not
6+
def checkYear(year):
7+
if (year % 4) == 0:
8+
if (year % 100) == 0:
9+
if (year % 400) == 0:
10+
return True
11+
else:
12+
return False
13+
else:
14+
return True
15+
else:
16+
return False
17+
18+
# Driver Code
19+
year = 2000
20+
if(checkYear(year)):
21+
print("Leap Year")
22+
else:
23+
print("Not a Leap Year")

0 commit comments

Comments
 (0)