7 · Lesson 3 of 8

Totalling, counting, max, min, average and linear search

Syllabus 7.3Syllabus 7.4

What this lesson covers

  • Explain the purpose of a given algorithm
  • Understand standard methods: linear search, bubble sort, totalling, counting, maximum, minimum and average

Key vocabulary

Standard method of solution
A well-known algorithm for a common task, such as totalling or searching.
Totalling
Keeping a running total: Total ← Total + Value.
Counting
Adding 1 each time something happens: Count ← Count + 1.
Maximum
The largest value in a set of data.
Minimum
The smallest value in a set of data.
Average (mean)
The total divided by the number of values.
Linear search
Checks each item in turn until the item is found or the end of the list is reached.
Flag
A Boolean variable that records whether something has happened, e.g. Found.

Check your learning

  • Quick check: 4 questions
  • Key vocabulary test: 8 terms
  • Activity 1: What's the output? · 6 questions
  • Activity 2: What does it do? · 6 questions
  • Activity 3: Standard methods quiz · 8 questions
Loading Bits of Bytes…