Commit b049e005 by BellCodeEditor

save project

parent c78924fd
Showing with 12 additions and 2 deletions
...@@ -5,4 +5,15 @@ print("玩家出拳:"+you) ...@@ -5,4 +5,15 @@ print("玩家出拳:"+you)
import random import random
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
xi=random.choice(list) xi=random.choice(list)
print(xi) print("机器出拳:"+xi)
\ No newline at end of file
if you==xi:
print("平局")
elif you=="石头" and xi=="剪刀":
print("恭喜,你赢了")
elif you=="剪刀" and xi=="布":
print("恭喜,你赢了")
elif you=="布" and xi=="石头":
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