Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 23 Online
OpenStudy (anonymous):

why does my python have a red highlight at the close inverted comma when I type [ 'odd' ]?

OpenStudy (anonymous):

It says that there is an invalid syntex

OpenStudy (anonymous):

if you only type ['odd'] into python shell and then hit enter it will respond with ['odd'], is there any more to this?

OpenStudy (anonymous):

Oh im sorry i did not mention this but i was following lecture 2. the notations seem to be in order but when i clicked F5 the error occured.

OpenStudy (harsimran_hs4):

please upload the code...using pastebin.com etc .... it will be easier to interpret the problem

OpenStudy (anonymous):

pastebin.com/42yvGTxy when i did that exact code 3 hours ago there was a syntex error at the very last ' (the one after the Odd)

OpenStudy (harsimran_hs4):

you have not used : in the if statement

OpenStudy (anonymous):

Oh! next to the 0? thank you so so much buddy!

OpenStudy (harsimran_hs4):

also i more error you have not closed the input statement also

OpenStudy (anonymous):

yup yup that was a typo :$ thank you!

OpenStudy (harsimran_hs4):

welcome...

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!