AQA Computer Science GCSE
Programming Concepts - Repetition
Repetition allows blocks of code to be repeated. In programming languages it is implemented using loops.
There are two essential types of repetition:
- Definite Repetition - where a block of code is repeated a set number of times
- Indefinite Repetition - where a block of code is repeated until some condition is met
Each type has its own uses and problems associated with it.
Definite Repetition is always implemented using FOR loops. Indefiite repetition uses either WHILE, REPEAT–UNTIL or DO–WHILE loops
Repetition is also termed Iteration. Loops iterate when they operate.
I've put the syntax for each of these on different pages: