Commit d1e132ce by BellCodeEditor

auto save

parent 23dfff73
Showing with 21 additions and 0 deletions
#导入模块
import random
#创建列表
list = ["石头","剪刀","布"]
# 让玩家选择出拳
player=input("请出拳:石头/剪刀/布")
#打印玩家出拳
print("玩家出拳:"+player)
#使用chioce方法随机抽取
computer = random.choice(list)
#打印结果
print("计算机出拳:"+computer)
#判断结果
if player == computer:
print("平局")
elif (player == "剪刀" and computer == "布") or (? and ?) or (? and ?) :
print("恭喜你赢了")
elif (? and ?) or (? and ?) or (? and ?):
print("不好意思你输了")
else:
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