您能帮我吗,我不确定为什么它会在最后一行的“ =”上给我一条错误消息,提示语法错误。
#import stuff
import random
#players enter names
p1 = input("Player1,¿Como te llamas?")
p1score = 0
p2 = input("Player2,¿Como te llamas?")
p2score = 0
#functions
def rollp1():
score1 = random.randrange(1,7)
score2 = random.randrange(1,7)
turnscore = score1 + score2
if turnscore % 2 == 0:
turnscore = turnscore + 10
else:
turnscore = turnscore - 5
print (p1,"Got a score of", turnscore)
global p1score = p1score + turnscore