MCPcopy Create free account
hub / github.com/geekcomputers/Python / is_leap

Function is_leap

Gregorian_Calendar.py:11–19  ·  view source on GitHub ↗
(year)

Source from the content-addressed store, hash-verified

9
10
11def is_leap(year):
12 leap = False
13 if year % 4 == 0:
14 leap = True
15 if year % 100 == 0:
16 leap = False
17 if year % 400 == 0:
18 leap = True
19 return leap
20
21
22year = int(input("Enter the year here: "))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected