Commit 6a5d5f9d by BellCodeEditor

auto save

parent b5c6bbbe
Showing with 3717 additions and 0 deletions
import random
pl=input("玩家出拳:(石头/剪刀/布):")
list=["石头","剪刀","布"]
co=random.choice(list)
print("玩家出拳:"+pl)
print("电脑出拳:"+co)
if pl in list:
if pl==co:
print("平局")
elif (pl=="石头" and co=="剪刀") or (pl=="剪刀" and co=="布") or (pl=="布" and co=="石头"):
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