0

Why is giving me an error if I am using the \n in the way that was taught?

print("This is how you make a new line, just follow the procedure \n and maybe you will succeed.")

25th Jul 2019, 6:56 PM
Whally O.
Whally O. - avatar
8 Respuestas
0
Hello Ace, this is Python, let me press enter and try again. Thank you
25th Jul 2019, 7:05 PM
Whally O.
Whally O. - avatar
0
File "..\Playground\", line 10 print("This is how you make a new line, ^ SyntaxError: EOL while scanning string literal
25th Jul 2019, 7:23 PM
Whally O.
Whally O. - avatar
0
That was the error
25th Jul 2019, 7:23 PM
Whally O.
Whally O. - avatar
0
So, basically I need to put the just after the comma and press enter, it won't work by pressing enter after the comma or how is it, please?
25th Jul 2019, 7:25 PM
Whally O.
Whally O. - avatar
0
use \ but it not do end of line just able break line in editor without error print("This is how you make a new line, \ just follow the procedure \n and maybe you will succeed.")
25th Jul 2019, 7:42 PM
zemiak
0
Thank you, Ace and Zemiak for your assistance. What I did was to rewrite the code in the following way: I type 'print' and then the parenthesis, then I type the "" (of course the playground put it double () and "" automatically) then I just keep typing the code and put the /n in the place that I wanted without pressing enter or nothing it changes the lines automatically, then I ran the code without errors, maybe that's what we should do in order to avoid that SyntaxError just keep entering the code and then finish when we are done.
25th Jul 2019, 8:52 PM
Whally O.
Whally O. - avatar