Seneca

Program Flow - Sequence

Computer Science: OCR GCSE, topic 2.2.3

Sequence

Sequence is the simplest structure for an algorithm to follow.

Sequence

Sequence

  • In a sequence algorithm, the computer follows a series of steps.
  • The steps are executed in the same order every time the algorithm runs.
  • Sequence is often not very useful for longer codes because we cannot use any selection or iteration structures.
Flow chart

Flow chart

  • The flow chart for a sequence program will have the blocks one by one.
  • One arrow will connect each block to the next block.
  • There will be no diamond shapes, so the diagram will be mainly:
  • Ovals.
  • Rectangles.
  • Parallelograms.

Test yourself on Program Flow - Sequence

  • Pick the correct sentence about sequence.

  • A sequence algorithm adds three numbers in this fixed order: first A, then B, then C. If the algorithm runs a second time with the same values for A, B and C, what happens to the order the steps run in?

Practise this topic for free