我一直在尝试运行该程序一段时间,但在尝试运行它时似乎无法找出导致错误的原因。
这是我收到错误的代码行:
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