Lesson 10 of 12
While Loops ⏳
What You'll Learn
- Use while loops to repeat code while a condition is True
- Avoid infinite loops by always updating the loop variable
- Know when to choose while vs for
Quick Check
1. When does a while loop stop running?
2. Why must you update the loop variable inside the loop?
3. Which keyword exits a loop immediately?
4. Which loop is best when you don't know the number of iterations in advance?