错在哪里呢?
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sum = 0.0
a = 0.0
for i in d.itervalues():
sum = sum + i
a = a + 1.0
print sum / a
为什么错了?
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
sum = 0.0
a = 0.0
for i in d.itervalues():
sum = sum + i
a = a + 1.0
print sum / a
为什么错了?
2016-07-27
举报