Commit 55ca0323 by BellCodeEditor

save project

parent 2c21aacf
Showing with 6 additions and 6 deletions
import random
player=input("请出拳:石头/剪刀/布")
list=["石头","剪刀","布"]
computer=random.choice(list)
print(computer)# 玩家出拳
print("玩家出拳:"+player)
import random#导入模块
player=input("请出拳:石头/剪刀/布")#接受输入信息
list=["石头","剪刀","布"]#创建列表
computer=random.choice(list)#获取列表里的随机值
print("计算机出拳:"+computer)#控制台打印计算机结果
print("玩家出拳:"+player)#控制台打印玩家结果
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