Calculate the average of numbers in a list

 numbers = [3, 7, 2, 8, 1]

total = sum(numbers)

average = total / len(numbers)

print("The average is", average)


Comments

Popular posts from this blog

Hello World Python Code with Explanation

Addition of Two numbers in Python

Iris Flowers Classification ML Project with Code