[Tutor] What's the invaild syntax? Error message and relative codesupplied.

Nathan Pinno falcon3166 at hotmail.com
Mon Aug 1 02:26:34 CEST 2005


Hey, looks like this is my problem. ) I'll just have to be more careful in 
the future.
----- Original Message ----- 
From: "Alan G" <alan.gauld at freenet.co.uk>
To: "Nathan Pinno" <falcon3166 at hotmail.com>; <tutor at python.org>
Sent: Sunday, July 31, 2005 6:24 PM
Subject: Re: [Tutor] What's the invaild syntax? Error message and relative 
codesupplied.


>> What the invalid syntax? Here is the error message:
>>  File "D:/Python22/grades.py", line 66
>>    which = which-1
>>       ^
>>SyntaxError: invalid syntax
>
> OK, so it tells you the syntax is wrong and the line it detected the 
> error. Try looking at a line or two before it.
>
>>            while which != -1:
>>                which = int(raw_input("Change which Grade: ")
>>                which = which-1
>
> Oh look, you've messed up the parens again, same as last time...
>
> Try checking your past mistakes Nathan, everyone tends to do the same 
> things wrong over and over. For me its missing the colon at the end of an 
> except statement...
>
> Alan G.
> 


More information about the Tutor mailing list