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

Simple Python Program Code for Snake Game

Iris Flowers Classification ML Project with Code

Linear Regression Model for House Price Prediction in Python