Calculate the sum of numbers from 1 to 10

 sum = 0

for i in range(1, 11):

    sum += i

print("The sum 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