← Back to the lesson: Loops
Sum Numbers
The exercise
Calculate the sum of numbers from 1 to 10 using a loop.
Store result in 'total' and print it.
Expected result: 55
Starter code
total = 0
# Add numbers 1 to 10 / Сложите числа от 1 до 10
print(total)
Write the code in the browser and run it — no installation needed.