Write a program to calculate the mean of a given list of numbers.

 

def calculate_mean(numbers):
    total = sum(numbers)
    mean = total / len(numbers)
    return mean

my_list = [1, 2, 3, 4, 5]
mean_value = calculate_mean(my_list)
print("Mean:", mean_value)

 


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *