Commit 62a492bd by BellCodeEditor

save project

parent 0db28b07
Showing with 14 additions and 0 deletions
......@@ -8,4 +8,18 @@ for i in range(len(hero)):
if i%2==1 and hero[i]>=power:
hero.insert(i-1,name)
hero.insert(i,power)
print(hero)
max_name = "赵一"
max_power = 30
i=3
for i in range(len(hero)):
if i%2==1 and hero[i]>max_power:
max_power = hero[1]
max_name = hero[i-1]
print(max_name)
print(max_power)
for i in range(-1,-7,-1):
print(hero[i],end=" ")
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