一些小白问题,请各位大神不要嫌弃
L = [75, 98, 59, 81, 66, 43, 69, 85]
sum = 0.0
n = 0
for x in L:
sum = sum + x
n = n + 1
print sum / n
这里面的n 和 n=n+1有啥用啊
L = [75, 98, 59, 81, 66, 43, 69, 85]
sum = 0.0
n = 0
for x in L:
sum = sum + x
n = n + 1
print sum / n
这里面的n 和 n=n+1有啥用啊
2020-03-09
举报