3.1.3

Algorithms (1/2)

Test yourself

Algorithms

 

Illustrative background for DefinitionIllustrative background for Definition ?? "content

Definition

  • An algorithm is the steps and rules that are followed when completing a process.
  • The main actions in an algorithm are sequence, selection and repetition.
Illustrative background for SequenceIllustrative background for Sequence ?? "content

Sequence

  • The sequence is the order of the steps.
    • E.g. the toppings cannot be put on the cakes until they are cooked.
Illustrative background for SelectionIllustrative background for Selection ?? "content

Selection

  • Selection is a yes/no choice.
  • A yes/no choice can be thought of as an ‘if ... then’ instruction.
  • E.g. should the cakes be taken out of the oven?
    • If an inserted knife comes out clean, then yes.
    • If an inserted knife comes out dirty, then no.
Illustrative background for RepetitionIllustrative background for Repetition ?? "content

Repetition

  • Repetition means doing the same step over again.

Jump to other topics

Unlock your full potential with Seneca Premium

  • Unlimited access to 10,000+ open-ended exam questions

  • Mini-mock exams based on your study history

  • Unlock 800+ premium courses & e-books

Get started with Seneca Premium