Pearson Edexcel GCSE Computer Science (1CP2)Specification point 6.1.5

Edexcel 1CP2 6.1.5: Finding and correcting errors

The free BugBot lessons that teach this point, a robot to try it on, and the past-paper questions that test it.

What it covers

Syntax errors and runtime errors announce themselves. A logic error does not: the program runs, finishes, and does the wrong thing. Finding one is detective work, and like detective work it goes faster with a method. This lesson is that method, and the tools that help.

  • Step 1: know what should happen
  • Step 2: find where it first goes wrong
  • Step 3: form a theory and test it
  • Common logic errors
  • Explaining it out loud
Read the free lesson (15 min)

Or do it in the simulator, with tasks that mark themselves

Lessons that teach it

  1. F6.4 Debugging logic errors Robust programs
    Finding the mistake that gives no message: watching, printing, stepping and common bugs.
  2. F6.6 The IDE Robust programs
    Editors, error diagnostics, the run-time environment and the translator, in the cell you use.

Try it on a robot

The task from F6.4 Debugging logic errors, running here. Change the program and press Run.

Past paper questions on this

Real exam questions that test this, each worked through with a program you can run.

The specification is Edexcel's own document; this page says which of our lessons teach point 6.1.5 and is not endorsed by the board.