Commit a33010b8 by BellCodeEditor

save project

parent 220fe62b
Showing with 20 additions and 0 deletions
import random
p=input("请出拳(石头,剪刀,布):")
l=["石头","剪刀","布"]
c=random.choice(l)
if p=="石头" or p=="剪刀" or p=="布":
print("玩家1出了",p)
print("玩家2出了",c)
if p==c:
print("双方平局")
elif (p=="石头"and c=="剪刀")or(p=="剪刀"and c=="布")or(p=="布"and c=="石头"):
print("玩家1胜利,玩家2失败")
else:
print("玩家2胜利,玩家1失败")
else:
print("Error!,错误!")
print("Please check your input!,请检查你的输入!")
exit()
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