calculating mean on python code example
Example 1: 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
Example 2: how to use a function to find the average in python
avreage_cost = cost
avg = sum(avreage)/len(avreage)
print("The average amout you spent is ", round(avg,2))