Commit e1586a57 by BellCodeEditor

save project

parent b5c6bbbe
Showing with 17 additions and 0 deletions
# 玩家出拳
import random
l=input("请出拳,剪子/石头/布")
print("玩家出拳"+l)
i=["剪子","石头","布"]
if l in i:
s=random.choice(i)
print("电脑出拳"+s)
if (s==l):
print("平局")
elif (l=="剪子"and s=="布" or l=="石头" and s=="剪子" or l=="布" and s=="石头"):
print("赢了")
else :
print("输了")
else:
print("输入错误")
\ No newline at end of file
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