Thinking in code · Repeating
A program often can't know ahead of time how many passes it needs, such as how far a hallway goes before the door.