+ 1
Leap Year Code issues
Hey y’all, attached is an attempted script for finding leap years. I’ve tried a few different ways (ie quotes around 0, no quotes, spaces between % and numbers, no spaces around % and numbers) and always get “invalid syntax”. What am I missing? Thanks in advance! https://code.sololearn.com/c7531c01xfzm/?ref=app
2 Respuestas
+ 1
Austin Lindquist , you cannot compare int with string ("0") in your if and elif clauses. Also you can shorten the code for example this way.
https://code.sololearn.com/c9y2dPNXVR3M/?ref=app
+ 1
Oh ok, awesome! Thank you. Yeah, I tried 0s w/ & without the “” marks, but still invalid. Its honestly been a while since ive been here, so trying to get refreshed lol.
But thanks! I appreciate the help & tip!