Where did I go wrong?



I did what I wanted to do and I pressed Save and Submit Code and it said that it was wrong. So then I viewed the hint and did what the hint said to do and then it said it was wrong again. Please help!

I expected it to be right.

# The string below is broken. Fix it using the escape backslash!

\'This isn't flying, this is falling with style!\'


Hi @gnithya ,

Escape the ' character that is contained within the string, rather than the ones that delimit the beginning and end of the string.


I don't really get what you mean. Should I only insert a backslash in one place?


With three single quotes Python thinks your string is "This isn" - because the string starts with the first single quote before the T in This, and ends with the second single quote after the n in isn't(but it doesn't recognize the t in isn't because it thinks the string has ended).

'This isn't flying, this is falling with style!'

So put the escape character before the single quote in the word isn't

'This isn\'t flying, this is falling with style!'

and it will know your string is the full sentence

"This isn't flying, this is falling with style!"


Yes. Also see @zh30 's response.


Thank you so much! This worked!


the ' in isn't shouldn't be there so put a back slash before it this isn\'t flying


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.