Commit 79426573 by BellCodeEditor

save project

parent 7562dcec
Showing with 15 additions and 0 deletions
# 玩家出拳 # 玩家出拳
p=input("请出拳)(石头/剪刀/布)") p=input("请出拳)(石头/剪刀/布)")
print("玩家出拳:"+p) print("玩家出拳:"+p)
import random
list=["石头","剪刀","布"]
compter =random.choice(list)
print(compter)
if p in list:
if p==compter:
print("平局")
elif (p=="石头"and compter =="剪刀")or(p=="剪刀"and compter =="布")or(p=="布"and compter =="石头"):
print("win!")
else:
print("lose")
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