Standard Deviation


#1



Standard Deviation


"Oops, try again. grades_std_deviation(8.7755102041) returned 18.2776094147 instead of the expected: 2.9623487648"
Don't understand what's wrong.


def grades_std_deviation(variance):
    variance = grades_variance(grades)
    return variance ** 0.5

print grades_std_deviation(grades)


#2

Hi @chipsurfer11311,

You are overwriting the variance parameter here, which defeats its purpose ...

    variance = grades_variance(grades)

That line should be removed.


#3

def grades_std_deviation(variance):
    return variance ** 0.5

print grades_std_deviation(grades)

changed to this and still doesn't work


#4

Instead of this ...

print grades_std_deviation(grades)

... you need to pass the variance to the grades_std_deviation function.

One way to do it is ...

variance = grades_variance(grades)
print grades_std_deviation(variance)

#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.