Repeating with while
Keep going while a condition is true.
Another Kind of Loop 🔄
Hello, loop legend! 🦸 The while loop repeats as long as something is True. Like "keep jumping WHILE the music plays"! 🎵
The while Word ⏳
while checks a condition. As long as it is True, the loop keeps going!
count = 0
while count < 3:
print("Hi! 👋")
count = count + 1All lessons in this course
- Why Loops Are Awesome
- Counting with for
- Repeating with while
- Drawing Patterns