jianghongz 发表于 2023-8-4 10:38:27

23.5python二级编程题

name = []
weight = []
for i in range(1,4):
   n = input("请输入第%d个人的名字:"%i)
   w = float(input("请输入第%d个人的体重(kg):"%i))
   name.append(n)
   weight.append(w)
_maxweight = max(weight)
i = weight.index(_maxweight)
print("体重最大的人是%s"%(name))
页: [1]
查看完整版本: 23.5python二级编程题