Quantcast
Channel: pycharm exercise "Character Escaping": task completed but wrong syntax - Stack Overflow
Viewing all articles
Browse latest Browse all 8

Answer by Matt Nona for pycharm exercise "Character Escaping": task completed but wrong syntax

$
0
0

The instructions in those lessons are not clear at all and someone from jetbrains should look into this.Even tho they don't mention it in the instructions, they also want you to edit the third line:

print("The name of this ice-cream is \"Sweeet\"")

to this:

print("The name of this ice-cream is \"Sweeet'n'Tasty\"")

No need to escape double quotes in the fourth line:

print('The name of this ice-cream is "Sweeet\'n\'Tasty"')

So the complete code should look like this

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

Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>