0
What's wrong with my code?
Lesson = input() subject = "I love English!" if Lesson == "English" else "That is an interesting choice." Choice = subject choose = "If you love English try learning Afrikaans aswell." if Choice == "I love English!" else "Try learning another subject aswell." print("Learner:" + " " + subject\n "Teacher:" + " " + choose) Result: File "./Playground/file0.py", line 5 print("Learner:" + " " + subject\n "Teacher:" + " " + choose) ^ SyntaxError: unexpected character after line continuation character Result without the \n: Learner: I love English! Teacher: If you love English try learning Afrikaans aswell. I want to break the line and create a new one for the 2nd sentence, but an error keeps occurring.
1 Answer
0
You need to put the \n inside quotes.