为什么这样不行,直接输入sum=0.0+x
L = [75, 92, 59, 68] sum = 0.0 for x in L: sum = sum + x print sum / 4
上面是原答案,下面是疑问
L = [75, 92, 59, 68] for x in L: sum=0.0+x print sum / 4.0
L = [75, 92, 59, 68] sum = 0.0 for x in L: sum = sum + x print sum / 4
上面是原答案,下面是疑问
L = [75, 92, 59, 68] for x in L: sum=0.0+x print sum / 4.0
2020-07-06
举报