-3
我一直在嘗試運行這個程序一段時間,但我似乎無法找到什麼導致錯誤時,試圖運行它。語法錯誤它可能是什麼?
這裏的代碼,我遇到了錯誤行:
from math import *
from myro import *
init("simulator")
def rps(score):
""" Asks the user to input a choice, and randomly assigns a choice to the computer."""
speak("Rock, Paper, Scissors.")
computerPick = randint(1,3)
userPick = raw_input("Please enter (R)ock, (P)aper, or (S)cissors.")
if userPick = R <#This line is where the error shows up at>
print "You picked rock."
elif userPick = P
print "You picked paper."
else
print "You picked Scissors."
score = outcome(score, userPick, computerPick)
return score
* *是什麼錯誤?究竟在哪裏?您可以請發佈完整的追溯錯誤消息 – Levon 2012-08-16 18:01:43
這不是一行代碼。 – 2012-08-16 18:01:51
什麼行和錯誤是什麼? – eduffy 2012-08-16 18:02:00