Finding errors, writing and amending algorithms
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
- The bug hunt
- Two kinds of error
Read the transcript of the teaching part
Last time
Before we start: last time, in Trace tables, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.
The bug hunt
Every programmer writes errors. The skill is finding them. In the exam, an algorithm is given with errors planted in it, and you must find and fix them. There is a short list of the errors examiners use, and once you know it, bugs are easy to spot.
Two kinds of error
A syntax error breaks the rules of the language, so the program will not run. An example is an IF with no ENDIF. A logic error lets the program run, but it gives the wrong result. An example is dividing by the wrong number, or multiplying instead of dividing.
How often it comes up
The whole chapter: Identifying Errors in an Algorithm.
Chapter 7.7: Errors in algorithms
- Finding errors, writing and amending algorithms 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.