Commit 17728a04 by BellCodeEditor

save project

parent e2fe7651
Showing with 13 additions and 0 deletions
import random
list=("布","剪刀","石头")
p=input("请出拳(石头/剪刀/布):")
suiji=random.choice(list)
print("玩家出:"+p)
print("电脑出:"+suiji)
if p==suiji:
print("平局")
elif (p=="石头" and suiji=="布") or (p=="剪刀" and "石头") or (p=="布" and "剪刀"):
print("你输了")
else:
print("你赢了")
\ No newline at end of file
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