Commit 1747ad4c by BellCodeEditor

save project

parent 115b7fce
Showing with 12 additions and 2 deletions
...@@ -3,4 +3,14 @@ print("玩家出"+abc) ...@@ -3,4 +3,14 @@ print("玩家出"+abc)
import random import random
cba=["石头","剪刀","布"] cba=["石头","剪刀","布"]
choice=random.choice(cba) choice=random.choice(cba)
print("我出"+choice) print("我出"+choice)
\ No newline at end of file if abc==cba:
prink("平局")
elif abc=="剪刀" and cba=="布":
prink("你赢了")
elif abc=="石头" and cba=="剪刀":
prink("你赢了")
elif abc=="布" and cba=="石头":
prink("你赢了")
else:
prink("你输了")
\ 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