[Tutor] Python Help

Dave Angel davea at davea.name
Sat Jan 26 15:24:26 CET 2013


On 01/23/2013 04:37 PM, Grady Trexler wrote:
> Below is my code.  I am using python 2.4 It tells me I have a syntax error.

I don't see any such thing.  Plesae include the traceback, which will 
indicate WHERE you have a syntax error.  And if you look yourself, 
you'll probably spot it, since it's usually either in the line specified 
or the one right before it.

Also, please use text mail.  By using html, you have killed the 
indentation that you presumably had in your original.  If you didn't 
have it in your original, then that's your second syntax error.

All right, I gave up and tried pasting your misformed code into a text 
editor.  Looks like you have a problem on the very first non-comment 
line:    no colon on the def line


>   Please help!  (I think the first twenty lines have what you would be
> looking for.  After that it just repeats itself.)
> #scenario maker
> #created by: Grady Trexler
> #started on 1/3/13
> #last update: 1/3/13
>
> def rungame()
> guyone = raw_input("Please enter a name:")
>
> guytwo = raw_input("Please enter a name:")
>
<snip>

Also please pick a better topic than  "Python Help".  Nearly every new 
thread here is asking for help with Python, so how does yours stand out? 
  Even "syntax error" would be a better one.



-- 
DaveA


More information about the Tutor mailing list