Commit ff524863 by BellCodeEditor

save project

parent bb73e74a
Showing with 17 additions and 0 deletions
list=[]
for i in range(3):
name=input("你叫啥")
list.append(name)
power=input("臂力多少")
power= int(power)
list.append(power)
hero=['赵一',38,'丁二',37,'孙武',52,'王猛',89,'周亮',98,'张宇',100]
for i in range(len(list)):
for j in range(len(hero)):
if i%2==1 and j%2==1:
if hero[j]>=list[i]:
hero.insert(j-1,list[i])
hero.insert(j-1,list[i-1])
break
print(hero)
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