Self-check only. Your answers stay in your browser — nothing is submitted or graded. Pick an answer for each question, then press Check my answers to see the answer key and explanations.
1. What problem does a loop solve?
2. What numbers does `range(5)` produce, and why does it start at 0?
3. What does `range(1, 6)` produce, and why does it stop at 5?
4. How does a `while` loop decide when to stop?
5. What causes an infinite loop, and how do you stop one in IDLE?
← Back to Lesson 10 · Enroll free in the full course