You are viewing a single comment's thread. Return to all comments →
**simple and sweet python solution **
from collections import Counter as c n = int(input()) x = list(map(int,input().split())) print(s.mean(x)) print(s.median(x)) a = c(x) m = 0 for i,j in a.items(): if m < j: m = j if m==1: print(min(x)) else: print(min(s.multimode(x)))
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 →
**simple and sweet python solution **