Commit dc207580 by BellCodeEditor

save project

parent 91feb33a
Showing with 16 additions and 4 deletions
player=input("请出拳,石头/剪刀/布:") p=input("请出拳,石头/剪刀/布:")
print("玩家出拳"+player) print("玩家出拳"+p)
import random import random
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
c = random.choice(list) c = random.choice(list)
print("电脑出拳"+c) print("电脑出拳"+c)
\ No newline at end of file if c==p:
print("平局")
elif c=="剪刀" and p=="石头":
print("你赢了")
elif c=="石头" and p=="布":
print("你赢了")
elif c=="布" and p=="剪刀":
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