The Variance


not sure what mistake I made here because it looks like it shoudl work

can someone help me see what is wrong?



def grades_variance(scores):
  average = grades_average(scores)
  variance = 0
  for score in scores:
    variance = variance + (average - score) ** 2
    lala = variance/len(scores)
    return lala
  print grades_variance(grades)




lala = variance/len(scores)

lala (the grade variance) should be calculated after getting the variance, so lala should be outside the loop

print grades_variance(grades) should be outside the function, given the function call execute the function

all your problems have to do with indent


oh my gosh…

thanks so much