def is_leap(year):
leap = False
# Write your logic here
if year%4==0:
return True
elif year%400==0:
return True
elif year%100 != 0:
return False
else:
return False
return leap
year = int(input())
print(is_leap(year))
It is showing that one test case is failing.
Pay attention to the order. Your code second condition
year%400==0cannot ever be reached, as anything that can be divided by 400 can also be divided by 4. Hence, every multiplication of 400 would have already been caught in theyear$4==0condition