Educational edition: "Character escaping"

Hello All,

Currently I am doing the PyCharm Introduction from the educational edition. Only I cannot pass the test although I think I have the correct answer.

I have typed the following

dont_worry = "Don't worry about apostrophes"
print(dont_worry)
print("The name of this ice-cream is \"Sweeet\"")
print('The name of this ice-cream is "Sweet\'n\'Tasty"')


Which prints out the assignment. What is going wrong here?
0
6 comments
Avatar
Permanently deleted user
The way you set up the completed string looks perfectly fine, so I think this is an error caused by the way PyCharm processes your answers. I'm not sure if this applies to everyone who has this problem, but in my case, PyCharm didn't accept my answer until I got rid of the incomplete string. I'm currently using Python 3.2 on PyCharm version 1.0.1 if that helps you in any way.

Here's the input I left in the text box when it finally worked for me:

dont_worry = "Don't worry about apostrophes"
print(dont_worry)
print('The name of this ice-cream is "Sweeet\'n\'Tasty"') <– this line should contain the answer placeholder
0
Avatar
Permanently deleted user
Hello Charles,

Thanks for the reply, although it still did not work for me. I am using Pycharm 1.0.1 and python 3.4.3.
0
Avatar
Permanently deleted user
Jeroen,

Could you please attach screenshot of this task with filled answer placeholder?
0
Avatar
Permanently deleted user
Sorry for the long waiting. Here it is.
Characterescape.png
0
Avatar
Permanently deleted user
Hi! The problem is that your closing single quote is outside of answer placeholder. Please, reset the task and try again.
0
Avatar
Permanently deleted user
Hello Liana, That worked. Thanks for the help and sorry for the late delay.
0

Please sign in to leave a comment.