Commit 26e77378 by BellCodeEditor

auto save

parent 25abb509
Showing with 17 additions and 2 deletions
import random
player=input("请出拳:石头/剪刀/布")# 玩家出拳
print("玩家出拳:"+player)
\ No newline at end of file
print("玩家出拳:"+player)
#导包
#创建石头剪刀布的列表 quan
list=["石头","剪刀","布"]
#用新函数随机数出来
abc=random.choice(list)
#打印电脑出什么
print("电脑出:"+abc)
if player == abc:
print("平局")
elif player == "石头" and abc == "剪刀":
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