0
我想在python 3.4版本中運行這個函數。我想在python 3.4版本中運行這個函數
tries = 0
answer = "Watson"
while(tries <= 3):
print("What is the name of the computer that played on Jeopardy?")
response = raw_input()
tries = tries + 1
if (response == "Watson"):
print("That is right!")
break;
elif (tries == 3):
print("Sorry. The answer is Watson.")
break;
else:
print("Sorry. Try again.")
我得到一個錯誤:
NameError: name 'raw_input' is not defined
有什麼不同,我對Python版本3.4
這工作謝謝 – error2007s