Pretty sure the problem here will be something like the other 2 posts I've made, the shell is testing other numbers but the call is throwing something off and I don't understand what it is.
The error I get is below, the return the correct one for the actual grades list.
Oops, try again. grades_std_deviation(12.6666666667) returned 18.2776094147 instead of the expected: 3.559026084
grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5] def print_scores(scores): for grade in scores: print grade def scores_sum(scores): total = 0 for grade in scores: total += grade print "Sum: ",total return total def scores_average(scores): sum_of_scores = scores_sum(scores) average = sum_of_scores / float(len(scores)) print "Average: ",average return average def scores_variance(scores): num = len(scores) average = scores_average(scores) var = 0 for score in scores: var += float(average - score) ** 2 print "Variance: ",var/num return var/num def scores_std_deviation(variance): return variance ** 0.5 variance = scores_variance(grades) print scores_std_deviation(variance)