This program is supposed to read in a list of numbers and compute the average and standard deviation.
As it is now, it returns nothing. Any help would be greatly appreciated.
As it is now, it returns nothing. Any help would be greatly appreciated.
Code:
scores=raw_input('Type in scores on one line with a space between each one: ') values = scores.split() for i in range (len(values)): values[i] = int(values[i]) def average(values): average=sum(values)/float(len(values)) return average def standardDev(average, values): total = 0 for i in values: total +=(average-i)**2 standardDev= total/((len(values)-1)**.5) return standardDev
Comment