代碼照搬還是有錯誤提示
這是源代碼
my_name = "Ella"
my_age = 18
your_name = input("what is your name?")
your_age = input("how old are you?")
print ("my name is",my_name,",and i am",my_age,"years old.")
print ("your name is",your_name,",and you are",your_age,".")
print ("thank you for buying my book,",your_name,"!")
下面是錯誤提示,完全不懂原因是什么?求解
=================== RESTART: D:\Python\PY file\thankyou.py ===================
what is your name?ella
Traceback (most recent call last):
? File "D:\Python\PY file\thankyou.py", line 3, in <module>
? ? your_name = input("what is your name?")
? File "<string>", line 1, in <module>
NameError: name 'ella' is not defined
>>>?
2018-10-14
我運行了一下,沒錯啊
2019-06-18
后面的標點符號加什么字符串,去了
2018-10-28
我知道問題在哪兒了,必須是raw_input,沒有“raw_”這部分就不可行,感謝哦~