Commit df4f11fb by BellCodeEditor

save project

parent a42c4b14
Showing with 8 additions and 2 deletions
import random import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳 p=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player) print("玩家出拳:"+p)
list=["石头","剪刀","布"] list=["石头","剪刀","布"]
x=random.choice(list) x=random.choice(list)
print(x) print(x)
if p==x:
print("平")
elif p=="石头" and x=="剪刀" or p=="布" and x=="石头" or p=="剪刀" and x=="布":
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