Commit dac81311 by BellCodeEditor

save project

parent 261bf67f
Showing with 11 additions and 0 deletions
...@@ -5,3 +5,14 @@ print("玩家出拳"+i) ...@@ -5,3 +5,14 @@ print("玩家出拳"+i)
s=["剪刀","石头","布"] s=["剪刀","石头","布"]
m=random.choice(s) m=random.choice(s)
print("电脑出拳"+m) print("电脑出拳"+m)
if i==m:
print("平局!!!")
elif i=="剪刀" and m=="布":
print("玩家获胜")
elif i=="石头" and m=="剪刀":
print("玩家获胜")
elif i=="布" and m=="石头":
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