varname = input("what is your name?: ")
print ("Hello", varname)
有沒有人知道爲什麼這不會工作?只是打印問候程序引發NameError
Traceback (most recent call last):
File "C:/Users/sfawcett/Desktop/python.py", line 1, in <module>
varname = input("what is your name?: ")
File "<string>", line 1, in <module>
NameError: name 'Lewis' is not defined
我已經添加了蟒蛇2標籤。請糾正我,如果我錯了@ user3801278 – parchment 2014-11-21 09:16:45
什麼版本的Python使用? – Hackaholic 2014-11-21 09:17:55
把你的完整代碼 – 2014-11-21 09:18:08