Iteration
A fundamental programming construct enabling repeated execution of code blocks using loops (for, while, do-while). Iteration reduces code duplication and enables algorithms to process variable amounts of data. Loop constructs include counter-controlled loops (for), condition-controlled loops (while), and do-while loops. Iteration combined with sequence and selection creates complex algorithms.
Real World
Instagram uses iteration to loop through every post in your feed, applying its ranking algorithm to each one individually before displaying them in personalised order.
Exam Focus
State whether a loop is count-controlled or condition-controlled — the mark scheme distinguishes between FOR and WHILE.
How well did you know this?