Commit 01055c75 by BellCodeEditor

save project

parent 7d78c143
Showing with 5 additions and 15 deletions
name=input("请输入名字:") a=['吕布']
power=int(input("请输入臂力:")) b=['袁术','公孙瓒','关羽','张飞','刘备','曹操']
hero=["赵一",30,"丁一",37,"孙武",52,"55",89,"99",98] a.extend(b[2:5])
if power>=hero[len(hero)-1]: print(a)
hero.append(name) \ No newline at end of file
hero.append(power)
for i in range(len(hero)):
if i%2==1 and hero[i]>power:
hero.insert(i-1,name)
hero.insert(i,power)
break
print(hero)
print(hero[len(hero)-6:])
\ 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