Commit 8859e663 by BellCodeEditor

save project

parent 81843895
Showing with 16 additions and 2 deletions
p=input("玩家猜拳 石头剪刀布") p=input("玩家猜拳 石头剪刀布")
print("玩家出:"+p) print("玩家出:"+p)
\ No newline at end of file import random
d=['石头', '剪刀','布']
if p in d:
d=random.choice(d)
print("电脑出:"+d)
if (p==d):
print("平局")
elif (p=="剪刀" and d=="布") or(p=="石头" and d=="剪刀") or(p=="布" and d=="石头"):
print("我们赢了")
else:
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