Python Function To Calculate The Mean Value Of An Array Of Numbers

def mean(numbers):
    return sum(numbers) / len(numbers)

numbers = [1, 2, 3, 4, 5]
mean_value = mean(numbers)
print(mean_value) # Output: 3.0

 

Add new comment

The content of this field is kept private and will not be shown publicly.