From 3a187ce54c112c631e92f63f4f2c8928057fb8aa Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 21 May 2023 15:32:07 +0800 Subject: [PATCH] save project --- diy.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/diy.py b/diy.py index 2348563..dea769a 100644 --- a/diy.py +++ b/diy.py @@ -3,12 +3,16 @@ # 请优化刚刚的代码,并增添交互效果,和自动输出最强三人信息的功能~ # 问询处 - - +name=input('你叫啥名呀') +power=int(input('你臂力多少呀')) # 归档处 hero=['赵一',30,'丁二',37,'孙五',52,'王猛',89,'周亮',98,'张宇',100] for i in range(len(hero)): - + if i%2==1 and here[i]>=power: + hero.insert(i-1,name) + hero.insert(i,power) + break +print(her[-6:]) -- libgit2 0.25.0