β³
A way to repeat instructions without writing them again and again.
Start with the idea
A loop repeats a block of code until a condition is met. It saves time and keeps programs short.
A for loop repeats a set number of times, while a while loop keeps going as long as a condition stays true.
Be careful of infinite loops, which never stop because their condition never becomes false.
SEE IT ANOTHER WAY
A visual model
MAKE IT CONCRETE
One small example.
EXAMPLEPAUSE & THINK
Quick check.
Choose the best answer, then see why.
YOUR PRIVATE FIELD NOTES
Save a thought for later.
Write down a question, a connection, or the one idea you want to remember. This note stays in your browser.
Key terms.
Further reading.
Good next steps from trusted learning and standards sources.