Commit 5eaf736f by BellCodeEditor

save project

parent bae6f4be
Showing with 9 additions and 2 deletions
...@@ -6,4 +6,11 @@ import random ...@@ -6,4 +6,11 @@ import random
let=["石头","布","剪刀"] let=["石头","布","剪刀"]
player=input("石头/布/剪刀") player=input("石头/布/剪刀")
print("玩家出"+player) print("玩家出"+player)
random.choice(let) ad=random.choice(let)
\ No newline at end of file print(ad)
if ad==player:
print("平局")
elif (ad=="石头" and player=="布") or (ad=="布" and player=="剪刀") or (ad=="剪刀" and player=="石头"):
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