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

Project 01: Python Code for Music Recommendation with Explanation

Iris Flowers Classification ML Project with Code