error in python d not defined.

Posted by dtechie on Stack Overflow See other posts from Stack Overflow or by dtechie
Published on 2010-04-10T10:05:06Z Indexed on 2010/04/10 10:13 UTC
Read the original article Hit count: 160

Filed under:

Hi

I am learning python and have this error . I can figure out where\what the error is in the code. File "<string>", line 1, in <module>.

Name = ""
Desc = ""
Gender = ""
Race = ""
# Prompt user for user-defined information
Name = input('What is your Name? ')
Desc = input('Describe yourself: ')

When i run the program

it outputs What is your Name? (i input d )

this gives the error

Traceback (most recent call last):
  File "/python/chargen.py", line 19, in <module>
    Name = input('What is your Name? ')
  File "<string>", line 1, in <module>
NameError: name 'd' is not defined

This is an example code from Python 3 for Absolute Beginners

Thank you for your help :)

© Stack Overflow or respective owner

Related posts about python