Sep-12-2017, 02:31 PM
(This post was last modified: Sep-12-2017, 02:41 PM by Mr_Keystrokes.)
As soon as I type in 'else:' and then press enter to go into the new line it pops up with invalid syntax.
In the following line I would like to write:
Strange, it seems to be working now that I pasted the full answer into the shell. Whereas before, when I tried to write the else statement it wouldn't allow me to go the next line and it highlighted the else function and indicated a syntax error.
Thank you guys for the pointers!
In the following line I would like to write:
print (n, " is an odd number")I am writing this in Python shell.
Strange, it seems to be working now that I pasted the full answer into the shell. Whereas before, when I tried to write the else statement it wouldn't allow me to go the next line and it highlighted the else function and indicated a syntax error.
Thank you guys for the pointers!