NP16 累加和与平均数
思路:
step1:按照对应要求对应输出即可;
代码如下:
my_list = []
for i in range(1,1001):
my_list.append(i)
print(min(my_list))
print(max(my_list))
print(sum(my_list))
print(round(sum(my_list) / 1000,1))
my_list = []
for i in range(1,1001):
my_list.append(i)
print(min(my_list))
print(max(my_list))
print(sum(my_list))
print(round(sum(my_list) / 1000,1))