LPTHW Ex4 Syntax Error : invalid syntax

I’m using python 3.6.5. I also received this error on Ex1 but I put every line into brackets and python was able to run it. I tried it on ex4 its not working. If I put every line into brackets it say “Not callable”. I tried to search this online but I didn’t find solution. I’m new to programming I just started learning with this book.
How to solve this problem ?
Please help.

You literally wrote those line numbers…
You saw the screenshot in the book and wrote:
1 cars = 100
while you should have written:
cars = 100
Delete all those line numbers, save and run it again. It will work this time.
The editor will add those line numbers for you to easier follow the code, but they are not hard coded in the script.
It’s just an editor setting you can turn on or off.


Thank you io_io, now its working.:smiley::smiley:

1 Like

One thing zed says, “don’t copy and paste, rather type it out and get used to it”.

1 Like