Commit 39ac5c63 by BellCodeEditor

save project

parent a4c4f02f
Showing with 10 additions and 2 deletions
......@@ -2,5 +2,12 @@ import random
t=input("出什么?")
print("玩家出:"+t)
O=["石头","剪刀","布"]
d=random.choice(o)
print("计算机出拳"+d)
d=random.choice(O)
print("计算机出:"+d)
if t==d:
print("平局")
elif t=="石头" and d=="剪刀" or t=="剪刀" and d=="布" or t=="布" and d=="石头":
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