this is my code for the hackerRank challenge write a function
def is_leap(year):
x=str(year)
y=int(x[-2:])
return y%4==0 or y%400==0 and y%100!=0
year = int(input())
print(is_leap(year))
All 5 test cases worked except for one, when year=2100, and I'd like to know why? what's wrong with my code? edit: after running the code I got the following:
Compiler Message: Wrong Answer
Input (stdin): 2100
Expected Output: False