0Still learning
Know0
What are the three main categories of errors in programming?
Enjoying Flashcards?
Tell us what you think
What are the three main categories of errors in programming?
The three main categories of errors in programming are: syntax errors, logic errors, and runtime errors.
Define "syntax error"
A syntax error is an error that breaks the grammatical rules of a programming language and stops it from running.
What is a logic error?
A logic error is where incorrect code is used that causes the program to run, but produces an incorrect output or result.
Define "runtime error"
A runtime error is where an error causes a program to crash during execution.
What are common causes of a syntax error?
Common causes of syntax errors include:
Typos,
Missing brackets or quotes,
Misplaced semicolons,
Invalid variable names,
Incorrect use of operators.
What is a method to find logic errors?
One method to find logic errors is to use trace tables.
What are common causes of a logic error?
Common causes of logic errors include:
Incorrect use of operators,
logical operator confusion,
looping one extra time,
Indexing arrays incorrectly,
Using variables before they are assigned.
What are common causes of a runtime error?
Common causes of runtime errors include:
Dividing a number by 0,
Index out of range of an array,
Unable to read or write to a drive.
True or False?
Syntax errors always prevent a program from running.
True.
Syntax errors break the grammatical rules of a programming language and stop it from running.
Why can logic errors be difficult to identify?
Logic errors can be difficult to identify because the program runs without crashing, but produces incorrect results. They may not be immediately obvious to the person who wrote the code.
Define "algorithmic thinking"
Algorithmic thinking is the process of creating step-by-step instructions in order to produce a solution to a problem.
What two key concepts does algorithmic thinking require?
Algorithmic thinking requires the use of abstraction and decomposition to identify each individual step.
What is the result of algorithmic thinking?
The result of algorithmic thinking is a precise set of rules (algorithm) that can be followed to solve a problem.
True or False?
Algorithmic thinking can lead to automated solutions.
True.
A set of traffic lights is an example of how algorithmic thinking can lead to solutions being automated.
What is a recommended approach for writing algorithms in an exam?
Use scrap paper or the back of the exam paper to sketch out ideas before committing to an answer, making it clearer and easier to understand.
What is the benefit of "chunking" an algorithm?
Chunking an algorithm into parts can help organise thoughts before putting the whole algorithm together.
True or False?
Pseudocode has a strict syntax that must be followed.
False.
Pseudocode does not have a strict syntax, but it's advised to stick to IGCSE specification standards for consistency.
Why is it important to comment on your code in an exam?
Commenting on your code helps both you and the examiner understand your answer and also awards marks in the mark scheme.