Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Avisikta-Majumdar/HackerRank_Python_Solutions
/ is_leap
Function
is_leap
Write a function.py:1–12 ·
view source on GitHub ↗
(year)
Source
from the content-addressed store, hash-verified
1
def
is_leap(year):
2
leap = False
3
if
(year % 4) == 0:
4
if
(year % 100) == 0:
5
if
(year % 400) == 0:
6
return
True
7
else
:
8
return
leap
9
else
:
10
return
True
11
else
:
12
return
leap
13
14
year = int(input())
15
print(is_leap(year))
Callers
1
Write a function.py
File · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected