Commit deb0faba by BellCodeEditor

auto save

parent c51c09c6
Showing with 14 additions and 11 deletions
a=input("玩家出拳")# 玩家出拳
print(a)
import random
list=["y","o","m"]
b=random.choice(list)
print(b)
if a==b:
print("=")
elif a=="y"and b=="m"or a=="o"and b=="y"or a=="m"and b=="o":
print(">")
a=input("请输入(石头/剪刀/布)")
print("玩家出拳:"+a)
list=["石头","剪刀","布"]
if a in list:
computer=random.choice(list)
print("计算机出拳:"+computer)
if a==computer:
print("平局")
elif a=="剪刀" and computer=="布" or a=="布" and computer=="石头" or a=="石头" and computer=="剪刀":
print("玩家赢了")
else:
print("玩家输了")
else:
print("<")
\ No newline at end of file
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