You are viewing a single comment's thread. Return to all comments →
from numpy import array, mean, var, std arr = [] n, m = map(int, input().split()) for _ in range(n): arr.append([*map(int, input().split())]) arr = array(arr) print(mean(arr, axis=1)) print(var(arr, axis=0)) print(round(std(arr), 11))
Seems like cookies are disabled on this browser, please enable them to open this website
I agree to HackerRank's Terms of Service and Privacy Policy.
Mean, Var, and Std
You are viewing a single comment's thread. Return to all comments →
For Python3 Platform
It isn't mentioned to round off the standard deviation to 11 decimals. I did that just to match with the given answer.