Commit 192c8924 by BellCodeEditor

save project

parent b5c6bbbe
Showing with 15 additions and 0 deletions
list=["剪刀","石头","布"]
p=input("剪刀,石头,布")
print("玩家出拳:"+p)
if p in list:
import random
w=random.choice(list)
print("电脑出拳:"+w)
if w==p:
print("平局")
elif (w=="剪刀" and p=="石头")or(w=="石头" and p=="布")or(w=="布" and p=="剪刀"):
print("你赢了")
else:
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