Commit 67fcd1b7 by BellCodeEditor

auto save

parent 4cac003e
Showing with 32 additions and 3 deletions
neme=input("输入名字") import random
print(neme+"你好啊") #玩家出拳
\ No newline at end of file name=input("玩家请出拳:石头/剪刀/布")
print(name)
#计算机出拳
list=['石头','剪刀','布']
computer=random.choice(list)
print('计算机出拳'+computer)
if name==computer:
print('平局')
elif name=='石头'and computer=='剪刀':
print('玩家赢')
elif name=='布'and computer=='石头':
print('玩家赢')
elif name=='剪刀'and computer=='布':
print('玩家赢')
else:
print('计算机赢')
import random#导入随机模块
list=['石头','剪刀','布']#创建数据来源
random.choice(list)#取随机数
print()#输出
if
elif
else:
\ No newline at end of file
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