You are viewing a single comment's thread. Return to all comments →
import numpy as np from scipy import stats
n=int(input()) s1=input() s2=list(s1.split()) s3=list(map(int,s2))
print(np.mean(s3),np.median(s3),int(stats.mode(s3)[0]),sep='\n')
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 →
import numpy as np from scipy import stats
n=int(input()) s1=input() s2=list(s1.split()) s3=list(map(int,s2))
print(np.mean(s3),np.median(s3),int(stats.mode(s3)[0]),sep='\n')