Answers for "python math.avg"

0

how to calculate mean in python

import statistics

a = [1,2,3,4,5]

mean = statistics.mean(a) 
#Similar for other values such as variance, standard deviation
Posted by: Guest on May-07-2020
0

python avg

my_list = [1,2,3,4]

import numpy as np
print("mean = ", np.mean(my_list))
Posted by: Guest on March-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language