def is_leap(year):
if year%4 == 0:
leap = True
if year % 100 == 0:
leap = True
if year % 400 ==0 :
leap = True
else:
leap = False
else:
leap = True
else:
leap = False
return leap
year = int(input())
print(is_leap(year))
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter