You are viewing a single comment's thread. Return to all comments →
python 3
def interQuartile(values, freqs): l=[] for i in range(len(values)): for j in range(freqs[i]): l.append(values[i]) l=sorted(l) if len(l)%2==0: print(float(statistics.median(l[len(l)//2:])-statistics.median(l[:len(l)//2]))) else: print(float(statistics.median(l[(len(l)//2)+1:])-statistics.median(l[:len(l)//2])))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Interquartile Range
You are viewing a single comment's thread. Return to all comments →
python 3