+ 2

Why is the SyntaxError: invalid syntax being displayed on the screen?

I'm doing the program as follows spam=7 if spam>7: print ("greater than") print ("End") Then as I press the enter the SyntaxError: invalid syntax messege is displayed

25th Jun 2019, 6:07 AM
Arpan Chakraborty
Arpan Chakraborty - avatar
3 Answers
+ 2
There isn't any problem with this code, please check it if there is any random character you didn't see
25th Jun 2019, 6:13 AM
Airree
Airree - avatar
+ 1
Your could compiles without error and prints "End" for me.
25th Jun 2019, 7:13 AM
ΛM!N
ΛM!N - avatar
+ 1
The code is not working on Python 3.7 version but it works fine on version 3.6
25th Jun 2019, 8:51 AM
Arpan Chakraborty
Arpan Chakraborty - avatar