Register - Login - Forgotten Password

Lesson 15: Using Range to Control Loops

Why does a loop need a sequence of numbers rather than just a repetition count? Python’s built-in function range() creates a range object that represents such a sequence. A for loop receives the represented integers one at a time through its loop variable. This distinction explains what range() supplies and how a loop uses it.

Lesson 15: Using Range to Control Loops

This lesson just one in the category Python Programming Level 1. To access this lesson you need to have a valid learner account, ask your parent to register you now.