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

luke rabidpoobear at gmail.com
Mon Aug 1 01:50:46 CEST 2005


NATHAN!
you have had this exact same problem yesterday!
cmon man.
If you see an invalid syntax error,
look on the preceeding line.
it's usually caused by not enough parenthesis for your function call.
so we scroll down to lines 64-66...

>            which = 1234
>            while which != -1:
>                which = int(raw_input("Change which Grade: ")
tada there's our error.
you forgot an extra parenthesis.
however many (( you have on a line you need ot have the same number of )) on
the line.
which = int(raw_input("Change which Grade: ")
becomes
which = int(raw_input("Change which Grade: "))

HTH,
-Luke



More information about the Tutor mailing list