Python, Syntax Error in elif
https://hastebin.com/sodoqoribu.bash (Here is my code)
Thanks guys for helping me out :)
Everytime, I try to run it it I get:
Traceback (most recent call last):
File "python", line 8
elif (getal > teRadenGetal)):
^
SyntaxError: invalid syntax
I don't know how to fix it. I hope someone can help me
@DanteChiappino he was correct with the intention, but it also must be elif getal < teRadenGetal:
not elif (getal < teRadenGetal)):
also
@AllAwesome497 it doesn't really matter. And in fact they should use those parentheses, it's a good programming habit.
@AllAwesome497 I removed one )
in the code to make it run all right.
I usually have ( )
around if
statements just because in some languages it's required so it just makes it consistent.
@ArchieMaclean Ah ok. No big deal ;)
Your indentation is wrong - the
if..elif..else
statements should be aligned, like:(Also, you had a
)
that shouldn't have been there on line 8. i have removed that above).Please upvote if this helps :)