Program errors (Edexcel GCSE Computer Science): Flashcards
📚Flashcards
Practise the cards
13 cards from this deck
ShowHide
Practise the cards
13 cards from this deck
Term for identifying & fixing errors in code
Term for identifying & fixing errors in code
Debugging
Three main categories of program errors
Three main categories of program errors
Syntax errors, runtime errors, logic errors
Error from breaking grammar rules of programming language
Error from breaking grammar rules of programming language
Syntax error
How IDEs display syntax errors (3 ways)
How IDEs display syntax errors (3 ways)
Red underlines, different colored text, error symbols in margin
Easiest type of error to find & fix
Easiest type of error to find & fix
Syntax error
Error where code looks correct but crashes when run
Error where code looks correct but crashes when run
Runtime error
What happens when a runtime error occurs
What happens when a runtime error occurs
Program starts normally, crashes at error point, gives error message
Runtime error when adding int to string
Runtime error when adding int to string
TypeError
Error where program runs but gives wrong results
Error where program runs but gives wrong results
Logic error
Characteristics of logic errors (3 points)
Characteristics of logic errors (3 points)
Correct syntax, no crash, incorrect output
Tools to find logic errors
Tools to find logic errors
Debugger, print statements, trace through code, test inputs
First step in practical debugging strategy
First step in practical debugging strategy
Read error messages carefully
Most common syntax errors in exams
Most common syntax errors in exams
Missing colons, brackets, incorrect spelling of keywords
