#rock,paper,scissors
#inputs of player 1 and player 2
t = ["Rock","Paper","Scissors"]
while p !='x':
p = raw_input("Player 1, please enter Rock,Paper, or Scissors!")
if p == 'x':
break,
while pp !='y':
pp = raw_input("Player 2, please enter Rock,Paper or Scissors!")
if p == 'y':
break,
#player 1 values of choice
if p == "Rock":
p = 1
elif p == "Paper":
p = 2
elif p == "Scissors":
p = 3
else
print("You have entered a wrong hand")
#player 2 values of choice
if pp == "Rock":
pp = 1
elif pp == "Paper":
pp = 2
elif pp == "Scissors":
pp = 3
#outcomes of the Game
if p > pp
print("Player 1 Wins")
elif p < pp
print("Player 2 Wins")
elif p = pp
print("Players Draw")
我不确定我的代码出了什么问题。有人能解释我做错了什么吗?我有所有的值存储和输入。但它不会运行。试图制作一名玩家Rock,Paper,Scissors游戏
while方法不是必需的,因为它们p和pp总是“x”和“y” –
无处不在的语法和缩进错误! –