Machine Don

What is loop?

A piece of code the machine repeats. A while loop keeps going as long as its question gets a yes and stops at a no. A for loop goes through each item in a list.

Also called: loops, for loop, while loop.

An analogy

Sorting three hundred sheets with one rule: take the next sheet, decide, and repeat until the pile is gone.

Where it shows up in the course

Related terms