Unit 4 · Loop-de-Loop · Lesson 39 of 57
Loops Looped
Loops: looped!
In this unit, you learned how to:
- Repeat things with
while(and how to escape an infinite loop) - Get out of a loop early with
break - Count with
forandrange, starting from 0 - Go through a string letter by letter
- Stop bad input from crashing your program with
tryandexcept - Brute force a PIN (on Alex's stuff only, please)
Quiz time!
Let's see if it stuck.
Knowledge check
A few questions on what the lesson covered. Create a free account to do this part.
Do this lesson for real
With a free account you get the terminals, challenges and checks that go with the lessons in Intro to Python, and your progress is saved as you go. CyberAcad is a 501(c)(3) nonprofit, so there is nothing to pay.