On Mon, Feb 20, 2012 at 6:46 PM, Michael Lewis <mjole...@gmail.com> wrote:
>  I at first put it outside and after all my functions but got the error below

That's the right place for it, you just spelled it wrong.

> and then put it inside my last function and the program ran.

That's not the right place for it.  Your program ran, but only because
nothing ever called your GetUserInput() function any more.

> Traceback (most recent call last):
>   File "C:/Python27/Homework/Homework5_1.py", line 24, in <module>
>     if __name == '__main__':
> NameError: name '__name' is not defined

It needs to be spelled "__name__" -- that's two underscores on each side.

-- 
Jerry
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to