Program Flow - Iteration

Computer Science: OCR GCSE, topic 2.2.5

Iteration

Iteration allows a group of statements to be repeated multiple times. Iteration statements are often called loops.

Indefinite iteration

Indefinite iteration

  • A block of code will repeat while a specified condition is true.
Definite iteration

Definite iteration

  • A block of code will repeat a known number of times.
Flow diagram

Flow diagram

  • A flow diagram for iteration uses the diamond shape.

Test yourself on Program Flow - Iteration

  • What are the two types of iteration?

  • What is definite iteration?

  • What shape does a flow diagram for iteration use?

Practise this topic for free