You are viewing a single comment's thread. Return to all comments →
def quartiles(arr): k=[] arr=sorted(arr) l=arr[:len(arr)//2] if len(arr)%2!=0: e=arr[(len(arr)//2)+1:] else: e=arr[(len(arr)//2):] k.append(int(statistics.median(l))) k.append(int(statistics.median(arr))) k.append(int(statistics.median(e))) return k
Seems like cookies are disabled on this browser, please enable them to open this website
Day 1: Quartiles
You are viewing a single comment's thread. Return to all comments →