Commit fbbe05d6 by BellCodeEditor

auto save

parent a0cbfb52
Showing with 22 additions and 2 deletions
# 玩家出拳
\ No newline at end of file
while True:
# 玩家出拳
me = input("请输入(石头/剪刀/布):")
print("玩家出拳:" + me)
import random
list = ["石头", "剪刀", "布"]
ai = random.choice(list)
print("电脑出拳:" + ai)
if me in list:
if me == ai:
print("平局!")
elif me=="石头" and ai=="剪刀":
print("胜利!")
elif me=="剪刀" and ai=="布":
print("胜利!")
elif me=="布" and ai=="石头":
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