猜拳游戏(石头剪刀布.py)
于 2020-11-30 发布
0 138
下载积分: 1
下载次数: 0
代码说明:
# 石头 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("电脑获胜")
下载说明:请别用迅雷下载,失败请重下,重下不扣分!
发表评论