You are viewing a single comment's thread. Return to all comments →
didn't want to use libraries
n = int(input()) numbers = sorted(list(map(int, input().split()))) print(round(sum(numbers) / n, 1)) l1, l2 = int(n / 2 - 1), int(n / 2) print(round( numbers[int(l2 - 1.5)] if n % 2 == 1 else (numbers[l1] + numbers[l2]) / 2, 1 )) d = {numbers.count(n): n for n in reversed(numbers)} print(list(d.values())[-1])
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 →
didn't want to use libraries