Standar deviation bug?


#1

Hi, I get this error : "TypeError: unsupported operand type(s) for ** or pow(): 'list' and 'float'"

We are supose to calculate the variance with the square root of the variance, that´s why we are using variance**0.5, but it says that I can not use a float.


def grades_std_deviation(variance):
    result= variance ** 0.5
    return result

Instead, I try to use the function sqrt() , but I get this error "TypeError: a float is required", I suppose that I have to use ** 0.5, but the system do not accept it

import math
def grades_std_deviation(variance):
    result= math.sqrt(variance)
    return result

#2

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