Commit 07a2e359 by BellCodeEditor

save project

parent b1cd962d
Showing with 4 additions and 3 deletions
...@@ -3,10 +3,11 @@ print("玩家出拳:"+p) ...@@ -3,10 +3,11 @@ print("玩家出拳:"+p)
import random import random
r=["石头","剪刀","布"] r=["石头","剪刀","布"]
print(r) h=random.choice(r)
if f==h: print(h)
if p==h:
print("平局") print("平局")
elif (f=="石头" and h=="剪刀") or (f=="剪刀" and h=="布") or (f=="布" and h=="石头") elif (p=="石头" and h=="剪刀") or (p=="剪刀" and h=="布") or (p=="布" and h=="石头")
print("赢") print("赢")
else: else:
print("输") 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