[Tutor] help

Noah Hall enalicho at gmail.com
Thu Feb 24 09:58:25 CET 2011


> I have found that this line will return an error every time while running
> the completed program, unless I enter a number. If I enter a numeric value
> the program will continue on as written.

When it comes to things like error messages, you need to post enough
code and the _exact_ error message in order for us to easily help you.

> name=input(“What is your name? “)

I imagine it's because you're using Python 2.*, where as the guide is
using the 3.* version.
The function you want in 2.7 is "raw_input", not "input". In 2.7,
"input" takes the string given then runs eval on it.
If you want to know more about this, read
http://docs.python.org/library/functions.html?#input and
http://docs.python.org/library/functions.html?#eval

Otherwise, you can either change your Python installation to Python
3.* to follow your guide, or you can carry on with 2.* and hope for
the best :)


More information about the Tutor mailing list