Find the sum of numbers in a list

 numbers = [2, 4, 6, 8, 10]

sum = 0

for num in numbers:

    sum += num

print("The sum of numbers is", sum)


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