Created
December 29, 2017 15:01
-
-
Save amulyakashyap09/3e9ec12b387bfd7c28266adf343de00c to your computer and use it in GitHub Desktop.
Function to check whether year is leap year or not | Hackerrank
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_leap(year): | |
leap = True | |
if year%4 != 0 or (year%100 == 0 and year%400 != 0): | |
leap=False | |
return leap |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment