Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit 48fa6ed

Browse files
authored
Merge pull request #224 from Vaibhavabhaysharma/basic_scripts1
Code to judge that year is leap or not
2 parents fd240ee + aabfba5 commit 48fa6ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Basic-Scripts/leap_year.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
def is_leap(year):
2+
3+
return year % 4 == 0 and (year % 400 == 0 or year % 100 != 0)
4+
5+
6+
year = int(input())
7+
print(is_leap(year))

0 commit comments

Comments
 (0)