formula of mean code example
Example 1: mean
#the plan is to have a boring mean
def mean(arr): # mean
return sum(arr)/len(arr)
Example 2: mean
#the plan is to remove all values that are zero
def mean(arr): # mod_mean
arr = list(filter(lambda n:n!=0,arr))
return sum(arr)/len(arr)