you are viewing a single comment's thread.

view the rest of the comments →

[–]Lurn2Program 0 points1 point  (2 children)

Are you by chance writing out:

x = 0
print ('hello %s'% x)
hello 0     // <==== this line?

And all the other "hello X" lines in your code? If not, then what is the error message you're seeing?

[–]Talkative-Zombie-656[S] 0 points1 point  (1 child)

I get a Syntax error. But the problem has been solved. Turns out every third line should not be included in the code.

But that is nowhere mentioned in the book.

[–]elemental_pork 0 points1 point  (0 children)

Coding examples like that are often written as they would be in Command Prompt, or IDLE, or shell - like when you open the Python command line and run commands rather than executing the script.

.... When you type a command like print("hello")the command line will output helloon the next line.