Skip to content

Commit

Permalink
fix: Escape \n and \r
Browse files Browse the repository at this point in the history
  • Loading branch information
RuolinZheng08 committed Dec 23, 2021
1 parent 1a1be22 commit ee401e4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions game/scripts/quiz_questions_from_csv.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -4107,9 +4107,9 @@ init python:
),
QuizQuestion(
question="What is the new line character in Python?",
true="\n",
false=["\s", "\new", "\m"],
explanation="\n is the newline character in Python.",
true="\\n",
false=["\s", "\\new", "\m"],
explanation="\\n is the newline character in Python.",
learn_more_url="https://www.freecodecamp.org/news/python-new-line-and-how-to-python-print-without-a-newline/",
difficulty=1,
),
Expand Down Expand Up @@ -4404,7 +4404,7 @@ init python:
QuizQuestion(
question="Which one of the following options prints \"Hello, World!\" without starting a new line at the end?",
true="print(\"Hello, World!\", end=\"\")",
false=["print(\"Hello, World!\")", "print(\"Hello, World!\", end=\"\n\")", "print(\"Hello, World!\", end=\"\r\")"],
false=["print(\"Hello, World!\")", "print(\"Hello, World!\", end=\"\\n\")", "print(\"Hello, World!\", end=\"\\r\")"],
explanation="Adding end=\"\" as the second argument will print the string without adding a new line character at the end. An empty string will be used instead.",
learn_more_url="https://www.freecodecamp.org/news/python-new-line-and-how-to-python-print-without-a-newline/",
difficulty=1,
Expand Down

0 comments on commit ee401e4

Please sign in to comment.