Commit 070722a2 by BellCodeEditor

save project

parent 7837794c
Showing with 12 additions and 0 deletions
...@@ -4,5 +4,17 @@ import random ...@@ -4,5 +4,17 @@ import random
list=["剪刀","石头","布"] list=["剪刀","石头","布"]
dm = random.choice(list) dm = random.choice(list)
print(dm) print(dm)
if player==dm:
print("平局")
elif player=="拳头" and dm=="剪刀":
print("恭喜,你赢了")
elif player=="剪刀" and dm=="布":
print("恭喜,你赢了")
elif player=="布" and dm=="石头":
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