猜拳游戏(石头剪刀布.py)
# 石头 0 剪刀 1 布 2 import randombot = random.randint(0, 2)player = int(input("输入您的结果")) if (player == 1) and (bot == 2) or (player == 2) and (bot == 0) or (player == 0) and (bot == 1): print("玩家获胜") elif player == bot: print("你们打成平手") else: print("电脑获胜")