Fetch
Decode
Explain
Activities
Flashcards
Exam Questions
Revise
Blog
Contact
Login
Login
Menu
Activities
Flashcards
Exam Questions
Revise
Blog
Contact
Login
Qualifications
KS3 Computing
Python Programming
Finding and Fixing Errors
Card
1
of
18
0
got it
0
still learning
Question
Evil question
Tap
Click or press space
to see the answer
Answer
Still learning
Got it
Turn over
Shuffle
0%
Round complete
Go again with the ones I'm still learning
Start the whole set again
Choose another set
All 18 cards in this set
What is meant by a syntax error?
An error caused by a typo or a missing symbol, which makes the program crash
What is the name for the extra spaces or Tab at the start of a line of code that show it belongs inside an if statement?
Indentation
What is meant by a logic error?
An error where the program runs but gives the wrong result
When a program is tested, what is meant by the expected result?
The output the programmer wants the program to give
What happens when a program contains a syntax error?
The program crashes and does not run
A program runs without crashing but always shows the wrong message. Which type of error is this?
A logic error
This line should start an if statement but causes a syntax error: if score > 40. What is missing?
A colon at the end of the line
A line reads print('Hello world) and the program crashes. What is wrong with the line?
The closing quotation mark is missing
A student writes Print('Enter your name') and the program crashes. What is the mistake?
The function name must be written in lowercase
The line print(5 + 3 will not run. Which symbol is missing?
A closing bracket at the end
The code under an if line is not indented, so the program crashes. What is the fix?
Indent the line by pressing Tab at the start
The program is meant to print 'Low stock' when there are only a few apples, but it prints it when there are lots. Which change fixes the logic error?
Change the > symbol to <
This program crashes when it is run. Why?
The variable name is written differently on each line
Why should a programmer test a program with several different inputs?
To check it always gives the expected result
Why is finding and fixing errors an important part of programming?
Because every programmer makes mistakes that need to be fixed
This line causes a syntax error: 1score = 10. What is wrong with the line?
A variable name cannot begin with a number
A program has two mistakes: a missing colon after an if line, and a condition that uses < instead of >. Which statement is true?
The missing colon stops the program, the wrong symbol gives a wrong result
A program runs without crashing but gives the wrong result. What is the best way to find the mistake?
Read the code one line at a time and check each condition