📅  最后修改于: 2022-03-11 15:04:32.040000             🧑  作者: Mango
while True:
choices = ["rock","paper","scissors"]
computer = random.choice(choices)
player = None
while player not in choices:
player = input("rock, paper, or scissors?: ").lower()
if player == computer:
print("computer: ",computer)
print("player: ",player)
print("Tie!")
print("computer: ", computer)
print("player: ", player)
print("You win!")
play_again = input("Play again? (yes/no): ").lower()
if play_again != "yes":
break
print("Bye!")