Commit 20604f82 by BellCodeEditor

save project

parent 95412266
Showing with 7 additions and 12 deletions
# 臂力挑战赛 bro1="关羽"
# 快用你机灵的小脑瓜想想,如何将刘强和他的臂力值自动插入到hero列表中? bro2="刘备"
name='刘强' bro3="张飞"
power=66 bros=["刘备","关羽","张飞"]
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] bro1=["关羽",160,8,.5]
# 自动排序 bro2=["刘备",161,9.1]
for i in range(len(hero)): bro3=["张飞",166,8.3]
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
print(hero)
\ 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