标签:put compute == 玩家 inpu computer span com layer
1 player = int(input("请输入您要出的拳:石头(1)/剪刀(2)/布(3):")) 2 computer = 1 3 print("玩家选择的是%d-电脑选择的是%d" % (player, computer)) 4 if (player == 1 and computer == 2) or (player == 2 and computer == 3) or ( 5 player == 3 and computer == 1): 6 print("电脑弱爆了!") 7 elif computer == player: 8 print("心有灵犀!") 9 else: 10 print("电脑太厉害了!")
标签:put compute == 玩家 inpu computer span com layer
原文地址:https://www.cnblogs.com/old-horse/p/12826152.html