qq_慕虎6311376
2021-09-12 17:59
相关截图:
相
L = [75, 92, 59, 68, 99] sum = 0 counter = 0 for x in L: counter += 1 sum += x avg = sum/counter print(avg)
L = [75,92,59,68,99]
he =0
for ch in L:
he=ch+he
print(he)
print(he/5)
for外面定义个sum,for里面,item加到sum里,for后面sum除以数组长度
Python3 入门教程(新版)
154174 学习 · 1075 问题
相似问题