Commit 69833a33 by BellCodeEditor

save project

parent 159fa802
Showing with 10 additions and 1 deletions
# 勇于挑战的创造师,请运行下面的代码,观察运行果,和小伙伴们说说你的发现 name=input("请输入您的名字:")
power=int(input("请输入臂力值:"))
hero=['赵一',30,'记得',35,'飞机',49,'速度',89,'哥哥',95,'零零',100]
for i in range(len(hero)):
if i%2==1 and power<=hero[i]:
hero.insert(i-1,name)
hero.insert(i,power)
break
print(hero[-6:])
\ 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