Commit c18f0d6f by BellCodeEditor

save project

parent 00f88887
Showing with 10 additions and 13 deletions
# 臂力挑战赛 学生=['wu','xiao','ba','bo']
# 快用你机灵的小脑瓜想想,如何将刘强和他的臂力值自动插入到hero列表中? 学生.pop(2)
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] print(学生)
name='input("你叫什么名字?")' 学生.insert(4,'nuo')
power='input("你的臂力值?")' print(学生)
# 自动排序 red=学生[:2]
for i in range(len(hero)): blue=学生[2:]
if i%2==1 and hero[i]>=power: print(red)
hero.insert(i-1,name) print(blue)
hero.insert(i,power) \ No newline at end of file
break
print(hero)
print(hero[6],hero[8],hero[10])
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