Commit 77c44fe5 by BellCodeEditor

save project

parent 10080025
Showing with 14 additions and 2 deletions
...@@ -3,4 +3,16 @@ print("玩家出拳"+player) ...@@ -3,4 +3,16 @@ print("玩家出拳"+player)
import random import random
gggggH=["石头","剪刀","布"] gggggH=["石头","剪刀","布"]
tt=random.choice(gggggH) tt=random.choice(gggggH)
print("电脑出拳"+tt) print("电脑出拳"+tt)
\ No newline at end of file if player==tt
print("平局")
elif player=="布" and tt=="石头":
print("玩家赢")
elif player=="剪刀" and tt=="布":
print("玩家赢")
elif player=="石头" and tt=="布":
print("玩家赢")
else:
print("电脑赢")
\ 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