From fc1d43c9ad6ffe82535ee67eda2d3a02cf312500 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 26 Mar 2022 11:59:10 +0800 Subject: [PATCH] auto save --- aaa.py | 10 ---------- diy.py | 19 ------------------- 2 files changed, 29 deletions(-) delete mode 100644 aaa.py delete mode 100644 diy.py diff --git a/aaa.py b/aaa.py deleted file mode 100644 index 08d1431..0000000 --- a/aaa.py +++ /dev/null @@ -1,10 +0,0 @@ -name=input("请输入您的姓名") -power=int(input("请输入您的臂力值")) -hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] -# 自动排序 -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[-6:]) \ No newline at end of file diff --git a/diy.py b/diy.py deleted file mode 100644 index 4758fd1..0000000 --- a/diy.py +++ /dev/null @@ -1,19 +0,0 @@ -# 臂力挑战赛 -# 快用你机灵的小脑瓜想想,如何将刘强和他的臂力值自动插入到hero列表中? -name='刘强' -power=66 -hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98] -# 自动排序 -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[-6:]) - -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) \ No newline at end of file -- libgit2 0.25.0