Ask coding questions

← Back to all posts
leap year problem
rocky321 (0)

plz help

what wrong in code.iam getting wrong result

year = int(input("Which year do you want to check? "))

if year % 4 == 0:

print("leap year")

elif year % 100 == 1:

print(" leap year")

elif year % 400 == 0:

print("leap year")


print("not leap year")
ZarmDev (47)

Could you show the real code? I can't see any errors or the entire thing ()

rocky321 (0)


this is same code but when you enter 1700 to confirm is it leap year or not it ans leap year which is not correct