Python Principles

Challenges VII

Slide solved ✓

The range function

Use the range built-in function with a for loop to add up all numbers from 1 to 100, both inclusive. Print the result.

(Remember that range does not include the last number. So range(100) is not quite enough.)

Lesson completed

Congratulations! You have finished the lesson "Challenges VII".

Rate the lesson

Leave feedback



Next lesson Browse lessons
Sorry, that's not right.

explanation