Commit 02c960d0 by BellCodeEditor

save project

parent 0dcf2d2c
Showing with 8 additions and 1 deletions
import random
play = input("在(石头/剪刀/布)中选择") play = input("在(石头/剪刀/布)中选择")
print("玩家出拳:"+play) print("玩家出拳:"+play)
import random
playa = ["石头","剪刀","布"] playa = ["石头","剪刀","布"]
a = random.choice(playa) a = random.choice(playa)
print("电脑出拳:"+a) print("电脑出拳:"+a)
if play == a:
print("平局")
if play=="石头" and a=="剪刀" or play=="剪刀" and a=="布" or play=="布" and a=="石头":
print("恭喜你赢了")
else:
print("很遗憾,你输了")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment