IIS_2023_1/malkova_anastasia_lab_6/statistic.py

22 lines
383 B
Python
Raw Normal View History

2023-11-17 01:19:07 +04:00
import numpy as np
def statistic(data):
data_min = min(data)
print('min:', data_min)
data_median = median(data)
print('median:', data_median)
data_max = max(data)
print('max:', data_max)
data_std = np.std(data)
print('std:', data_std)
return data_min, data_median, data_max, data_std
def median(list):
return np.median(np.array(list))