I'm fairly new to python and I've currently run into a road block in this problem. I set up this code:
def average(the_list): return the average of the list def deltalist(the_list,a): return a list which is each of the element of the_list subtracted by a def squarelist(lst): return a list which is each of the element of the_list squared def variance(the_list,mean): return squarelist(deltalist(the_list,mean)) def stddev(l): a = average(l) l3 = variance(l,a) return math.sqrt(sum(l3)/(len(l3) - 1)) lst = [1,3,4,6,9,19] print(stddev(lst))
return statements is the problem I've ran into. I want to implement the average, squarelist, and the delta list to find the standard deviation of the list that I've used in this code. How do I use the numbers that I have listed in
lst to get standard deviation?