ExamYard Lectures

Standard methods: totals, counts, searching and sorting

IGCSE Computer Science 0478 · Chapter 7.4, Standard methods · 6-minute lecture

The teaching part (1 min) is free to watch. A free account opens the whole lecture: 7 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.

What this lecture covers

  1. Six routines, every Paper 2
  2. Totalling
  3. Totalling in pseudocode
Read the transcript of the teaching part

Last time

Before we start: last time, in Designing a solution, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.

Six routines, every Paper 2

Almost every Paper 2 uses the same few routines. Totalling and counting. Finding the maximum, the minimum and the average. And two ways of working with lists: the linear search, and the bubble sort. Learn their pseudocode, and you have a toolkit for the 15-mark question as well.

Totalling

Totalling keeps a running total, by adding each value to it. The total must be set to zero before the loop begins. Inside the loop, every new value is added to the total. After the loop, the total is output.

Totalling in pseudocode

Here is totalling. Total is set to zero first. Then each price is input, and added to the total. And the total is output after the loop.

How often it comes up

The whole chapter: Standard Methods of a Solution.

Chapter 7.4: Standard methods

Also for IGCSE Computer Science 0478

Which topics come up most in IGCSE Computer Science 0478 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.

The topical past-paper books: Paper 1, Paper 2.