+ 1

How do I separate a code line from the if statement?

In the lesson on if statements the program looks like this: if 10>5: print("10 grater than 5") print("Program ended") However, if I try to do this and press enter, the program runs before i can type in print("Program ended"). If I use Ctrl+J I get a syntax error.

15th Aug 2019, 10:10 AM
Andrej Nikolić
Andrej Nikolić - avatar
3 Antworten
0
I have the same problem. @Black Jesus I tried your solution and got this: if 10>5: ... print("false") ... \n File "<stdin>", line 3 \n ^ SyntaxError: unexpected character after line continuation character
17th Aug 2019, 4:09 AM
Gene Di Fiore