我正在学习python并且有这个错误.我可以弄清楚代码中的错误是什么.
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: ')
Run Code Online (Sandbox Code Playgroud)
当我运行该程序
它输出你的名字是什么?(我输入d)
这给出了错误
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
Run Code Online (Sandbox Code Playgroud)
这是Python 3 for Absolute Beginners的示例代码.