Commit 39cb8985 by BellCodeEditor

save project

parent f2cec2d3
Showing with 16 additions and 5 deletions
import random
a=input("玩家出拳")
print("玩家请出拳"+a)# 玩家出拳
list=["石头","布","剪刀"]
computer=random.choice(list)
print(computer)
\ No newline at end of file
if a in list:
import random
print("玩家请出拳"+a)# 玩家出拳
computer=random.choice(list)
print(computer)
if a==computer:
print("平局")
elif computer==("石头") and a==("布") or computer==("剪刀") and a==("石头") or computer==("布") and a==("剪刀"):
print("你赢了")
else:
print("你输了")
else:
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