Commit dac81311 by BellCodeEditor

save project

parent 261bf67f
Showing with 12 additions and 2 deletions
...@@ -4,4 +4,15 @@ i=input("请出拳(石头/剪刀/布)") ...@@ -4,4 +4,15 @@ i=input("请出拳(石头/剪刀/布)")
print("玩家出拳"+i) print("玩家出拳"+i)
s=["剪刀","石头","布"] s=["剪刀","石头","布"]
m=random.choice(s) m=random.choice(s)
print("电脑出拳"+m) print("电脑出拳"+m)
\ No newline at end of file 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