Commit 155dd7ae by BellCodeEditor

save project

parent 3515f1dd
Showing with 17 additions and 2 deletions
# 我们都爱夸夸夸
\ No newline at end of file
import random
name=input("请出拳(石头/剪刀/布"))
print(name+"玩家出拳")
list= ["石头,剪刀,布"]
lf=random.choice(list)
print(lf)
print("玩家出拳"+name)
print("计算机出拳"+lf)
if name in list:
if name==lf:
print("平局")
elif(name=="石头" and lf=="剪刀")or(name=="剪刀" and lf=="布")or(name=="布" and lf=="石头")
print("胜利")
else:
pass("失败")
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