Commit 1d43bb7c by BellCodeEditor

auto save

parent 4d8b6805
Showing with 14 additions and 0 deletions
...@@ -6,8 +6,22 @@ ...@@ -6,8 +6,22 @@
# 归档处 # 归档处
#import turtle
#screen=turtle.Screen()
hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100] hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100]
#name=screen.textinput("请问","你的姓名")
#kg=int(screen.textinput("请问","重量"))
name=input("你的姓名")
kg=int(input("重量"))
for i in range(len(hero)): for i in range(len(hero)):
if 30<=kg<=100 and i%2==1:
if kg>=hero[i]:
hero.insert(i-1,name)
hero.insert(i,kg)
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