[Tutor] Help for to do a script

Alan Gauld alan.gauld at btinternet.com
Fri Mar 16 20:07:37 CET 2012


On 16/03/12 18:52, Boris Vladimir Comi wrote:

> *File "/home/mcidasv/JYTHON/TIR.py", line 22
> count = count + 1;
> ^
> SyntaxError: invalid syntax*

Error messages indicate where Python found the problem.
Often the real problem is a line or so before that.

In your case you omitted the colon after the if statement.

Note that Python does not require semi colons at
the end of lines. It rarely causes problems but
it doesn't help either.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list