Debugging, Testing, and Error

Ages 16–18

Difficulty adapts to you

Debugging, Testing, and Error

A syntax error stops a program from being understood; a runtime error occurs while it runs; a logic error produces the wrong result. Test normal, boundary, invalid, and unexpected inputs. Compare approximate outputs with accepted tolerances when measurements are involved.

Your goals

  • ✓You can find faults systematically and measure rounding, input, and output errors.
  • ✓You can use Debugging, Testing, and Error, model correctly.
  • ✓You can use the definitions, units, assumptions, and examples to check your answer.

Words to know

Debugging, Testing, and Error:
Find faults systematically and measure rounding, input, and output errors.
model:
A rule or representation used to describe a situation and make a prediction.

Examples

  • 1Test a percentage function with 0%, 100%, a negative input, and a very large value.
  • 2Absolute error is |measured − true|; percentage error is absolute error ÷ true × 100%.

Check these

  • • Do not skip the meaning of a term or give a result without explaining what it means.
  • • Keep every number, symbol, label, and unit in its correct place.
  • • Show enough working to check how you reached your answer.

Helpful habits

  • • Read the whole question before choosing what to do.
  • • Show one clear step at a time and check each step.
  • • If you are stuck, draw a model, try smaller numbers, or revisit the example.

Now try your own

Create your own debugging, testing, and error example, solve it, and explain how you checked it.

Spark

Spark

Creativity & Innovation

“Challenge yourself: can you explain this to a friend?”