Created
May 13, 2020 06:38
-
-
Save meet100ni/cee7e941d978d0ff650cc3ac69b07c1f to your computer and use it in GitHub Desktop.
Write a Function: HackerRank Solution to find leap year
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 = False | |
return year % 4 == 0 and (year % 400 == 0 or year % 100 != 0) | |
year = int(input()) | |
print(is_leap(year)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment