Commit 621b28cb by BellCodeEditor

auto save

parent a0cbfb52
Showing with 18 additions and 0 deletions
# 玩家出拳 # 玩家出拳
import random
while True:
player = input("请出拳(剪刀/石头/布):")
print("你的出拳是:"+player)
a = ("剪刀","石头","布")
if player in a:
diannao=random.choice(a)
print("电脑出拳:"+diannao)
if player==diannao:
print("平局")
elif (player=="剪刀" and diannao =="布") or (player=="石头" and diannao=="剪刀") or (player=="布" and diannao == "石头"):
print("你赢了")
else:
print("你输了")
else:
print("输入错误")
import random
\ 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