Commit a8766431 by BellCodeEditor

save project

parent b5c6bbbe
Showing with 20 additions and 0 deletions
import random
# 玩家出拳
i=input("请出拳(石头/剪刀/布)")
print("玩家出拳"+i)
s=["剪刀","石头","布"]
m=random.choice(s)
print("电脑出拳"+m)
if i!="剪刀"or"石头"or"布":
print("输入错误")
elif i==m:
print("平局!!!")
elif i=="剪刀" and m=="布":
print("玩家获胜")
elif i=="石头" and m=="剪刀":
print("玩家获胜")
elif i=="布" and m=="石头":
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