Standard methods: totals, counts, searching and sorting
Watch the whole lecture free
Make a free account to watch every lecture to the end: 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.
That was the teaching part. The rest of this lecture is free with an account: 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.
No password needed now: we email you a link to set one. Already have an account? Sign in, then come back to this page.
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
- Six routines, every Paper 2
- Totalling
- 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
- Standard methods: totals, counts, searching and sorting 6 min
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.