Ask coding questions

← Back to all posts
leap year problem
rocky321

plz help

what wrong in code.iam getting wrong result

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

if year % 4 == 0:

elif year % 100 == 1:

elif year % 400 == 0:

else:

Voters
rocky321
Comments
hotnewtop
ZarmDev

It works?

ZarmDev

@ZarmDev I tried it

rocky321
ZarmDev

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

rocky321

@ZarmDev

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