Python for Loop with range
Multiple Choice Easy
Question
How many iterations does `for i in range(3, 10):` perform?
Hint
range(start, stop) goes from start to stop-1.
Explanation
range(3, 10) generates 3, 4, 5, 6, 7, 8, 9 — that is 7 values (from 3 to 9 inclusive, which is 10 − 3 = 7). The stop value is exclusive.
Related Resources
Related Lessons
- Conditions and Loops
range() function.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.