Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 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 Respostas
+ 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!