Commit 44289a7e by BellCodeEditor

auto save

parent a0cbfb52
Showing with 14 additions and 2 deletions
# 玩家出拳 # 玩家出拳
\ No newline at end of file player = input("请出拳(石头/剪刀/布):")
print("玩家出:"+player)
#计算机出拳
##0.导入模块 random
##1.首先,需要有出拳的类型。使用列表list存储出拳类型:石头、剪刀、布
##2.需要随机为计算机出一种拳。使用random模块
##3.查看计算机出的拳。使用打印函数print()
#显示结果
#1.平局:玩家和计算机出拳一样;
#2.玩家赢:玩家出剪刀,计算机出布;玩家出石头,计算机出剪刀;玩家出布,计算机出石头
#3.玩家输:玩家出布,计算机出剪刀;玩家出剪刀,计算机出石头;玩家出石头,计算机出布
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