chengji = [75, 92, 59, 68, 99] sum = 0 n = 0 for i in chengji: sum+=i n+=1 print(sum/n)
sum = 0.0 就是78.6了
sum
=
0
可以将结果转换成float类型
i=float(sum)
print(i/5)