Commit 2d5bd959 by BellCodeEditor

save project

parent 220fe62b
Showing with 21 additions and 0 deletions
import random
play = input("请出拳(石头/剪刀/布):")
print(play)
aa = ["石头","剪刀","布"]
qq = random.choice(aa)
print(qq)
if play in aa:
if play==qq:
print("平局")
elif play=="石头" and qq=="剪刀":
print("你赢了!!")
elif play=="剪刀" and qq=="布":
print("你赢了!!")
elif play=="布" and qq=="石头":
print("你赢了!!")
else:
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