Commit 124f89a5 by BellCodeEditor

auto save

parent ef6eb902
Showing with 7 additions and 4 deletions
...@@ -9,14 +9,17 @@ ...@@ -9,14 +9,17 @@
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100] hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100]
name = input("名字:") name = input("名字:")
power = input('力量:') power = input('力量:')
int h p = int(power)
for i in range(len(hero)): for i in range(len(hero)):
h=int(hero[i%2==1]) if i%2==1 and hero[i]>=p:
if h>=power
hero.insert(i-1,name) hero.insert(i-1,name)
hero.insert(i,power) hero.insert(i,power)
break break
print(hero) p = hero[-6:]
for
print(hero[-6:])
......
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