I apologise for the delay in my blog posts, after completing my MTA exam and preparing a schedule for my next area of study, i decided to have a break so my brain didn't shut down with information overload!
Anyway, today we are continuing with the Strings and Console output on Code Academy.
The aim of the code shown below is to fix the code so it works again.
As you can see, the code:
'This isn't flying, this is falling with style!'
Isn't working, the reason for this is that Python is detecting the apostrophe in the middle of ISN'T as the end of the sentence.
The way to avoid this and to get the code working again is to use the \ as it tells python that an apostrophe is supposed to be there and to look elsewhere for the end of the sentence. See Below
The code: 'This isn\'t flying, this is falling with style!'
This code now works and we pass onto the next lesson.
The next post coming after this one, will continue the lesson.
Toodles!
No comments:
Post a Comment