Commit adae72c8 by BellCodeEditor

auto save

parent 56947ff6
Showing with 7 additions and 0 deletions
import random import random
player = input("请出拳(石头/剪刀/布):\n")
# 列表,存放剪刀,石头,布
list = ["剪刀","石头","布"] list = ["剪刀","石头","布"]
# 机器人随机在list列表中抽取出拳
computer = random.choice(list) computer = random.choice(list)
# 打印玩家出拳
print("玩家出拳为:"+ player)
# 打印机器人出拳
print("计算机出拳为:"+ computer) print("计算机出拳为:"+ computer)
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