You are viewing a single comment's thread. Return to all comments →
from collections import Counter n = int(input()) X = sorted(map(int, input().split())) c = Counter(X) print(round(sum(X)/len(X), 1)) if len(X)%2==0: print(round((X[len(X)//2]+X[len(X)//2-1])/2, 1)) else: print(X[len(X)//2]) najw = max(c.values()) print(min([x[0] for x in c.items() if x[1]==najw]))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 0: Mean, Median, and Mode
You are viewing a single comment's thread. Return to all comments →
Python sol