Errors that can occur in programs (Edexcel GCSE Computer Science): Flashcards

📚Flashcards
Errors that can occur in programs
Sign up to keep revising.Create a free account to study more flashcards and track your progress.

Practise the cards

13 cards from this deck

Show

Programming error definition

A mistake/bug that stops a program working properly

Three main types of programming errors

Syntax errors, runtime errors, logic errors

Syntax error definition

Breaking the rules of the programming language

Why syntax errors are easiest to find

Computer tells you exactly where the problem is

Examples of syntax errors

Misspelling commands, missing punctuation, wrong indentation

Runtime error definition

Errors that only show up when program is running

When runtime errors typically occur

When you ask computer to do something impossible

Examples of runtime errors

Dividing by zero, accessing non-existent file or list item

Logic error definition

Program runs but produces wrong results or behaves unexpectedly

Why logic errors are hardest to find

No error messages appear, program seems to work normally

What to check when finding logic errors

Variable initialization, mathematical operators, assignment statements

Debugging definition

Process of finding and fixing problems in code

How to debug logic errors

Test with known inputs, use print statements, work through code line by line

Join 100,000+ GCSE students studying Flashcards with us.

Select your subjects, and get access to A+ resources today.