Commit 3d594c86 by BellCodeEditor

auto save

parent b7b7387f
Showing with 1 additions and 16 deletions
import random 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