Syntax error EOL while scanning single-quoted string’

Asked By 10 points N/A Posted on -
qa-featured

Hello all,

I am newcomer having hard time with these codes. I got an error message when I try to run the code. The error message states that ‘Syntax error EOL wile scanning single-quoted string’. I have the error image for more information. Please explain me in detail to fix the error. Your help is great. Thanks a lot.

Syntax Error

EOL while scanning single—quoted string

File: “Untitled Script 2”, line 2

print “Here are the ten numbers from 0 to 9

Cancel Edit

SHARE
Answered By 0 points N/A #188149

Syntax error EOL while scanning single-quoted string’

qa-featured

The Error stated, the EOL or End of Line, is triggered by undetermined ending tag. For example, a "(" ends with an ")", and also for strings the whole sentence should be in between two quotation marks ( " or ' ) at the beginning and end.

Sample

The wrong part is only a simple end quotation for your print function. Here:

Rather than:

print "Here are the ten numbers from 0 to 9

It should be:

print "Here are the ten numbers from 0 to 9"

There you go! A simple semantic error causing great problems(?).

Check the other parts of your code for similar errors.

Login/Register to Answer

Related Questions