未定义python d中的错误。
发布于 2021-02-02 23:19:31
我正在学习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: ')
当我运行程序
它输出你叫什么名字?(我输入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
这是来自Python 3的Absolute Beginners的示例代码。
关注者
0
被浏览
98
1 个回答