Commit 08f254ec by BellCodeEditor

save project

parent 10f9b03b
Showing with 14 additions and 6 deletions
player=input("请出拳/石头/剪刀/布")
print("玩家出拳:"+ player)
import random
list=["布","石头","剪刀"]
computr=random.choice(list)
print(computr)
pleyer=input("玩家出拳:(布/剪刀/石头)")
list=["布","剪刀","石头"]
computer=random.choice(list)
print("玩家出拳:"+pleyer)
print("电脑出拳:"+computer)
if pleyer in list:
if (pleyer=="石头" and computer=="剪刀") or(pleyer=="布" and computer=="石头")or(pleyer=="剪刀"and computer=="布"):
print("你赢了")
elif pleyer==computer:
print("平局")
else:
print("你输了")
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