0

invalid text because of:

Hi guys, Hopefully someone can say me why this doesnt work, I have no idea: x = 3 y = 4 print (x+y) if ("my first Addition") ||||||| <- but there is after 'run module' a red line and invalid syntax. I wrote it on computer with IDLE Python 3.7 Why? Whats wrong? Sorry, Im a raw beginner with programming 😅 Many thanks for helping

12th Jan 2019, 8:39 PM
Paul
2 Antworten
+ 3
Not sure what the problem seems to be, do be careful though as python is tab sensitive x = 3 y = 4 print(x + y) will output 7. if it's on an if statement you're struggling do keep the syntax in mind: if x + y == 7: print("this is 7") else: print("not 7") python uses the tabs as blocks instead of brackets or "endif" / "end". here's an example: https://onlinegdb.com/rkG8tRDzN hope this helps, if you got any other questions, feel free to ask.
12th Jan 2019, 9:17 PM
Joery De Loose
Joery De Loose - avatar
0
Hi Joery, thank you for helping. I installed atom.io now it's currently running 👌
13th Jan 2019, 1:28 PM
Paul