wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Syntax and Logic Errors

Total questions: 12

Worksheet time: 12mins

Name
Class
Date
1.
Syntax errors are always spotted when the program is compiled or interpreted.
a)
True
b)
False
2.
Logic errors are detected by the programming IDE being used.
a)
False
b)
True
3.
Syntax errors are caused by incorrectly typed source code.
a)
True
b)
False
4.
A program won't run if there is a logic error.
a)
False
b)
True
5.
Modern IDEs are able to spot syntax errors as the programmer types.
a)
True
b)
False
6.
Which statement best describes logic errors?
a)
An error in a program that causes it to produce incorrect ouputs but not a crash.
b)
An error in a program that causes it to crash.
c)
An error in the program caused by mis-spelt instructions.
d)
An error in a program caused by hardware failure.
7.
What's the mistake in this code?
a)
The variable "surname" needs a capital letter (first line of code)
b)
"print" needs a capital letter
c)
"input" needs a capital letter
d)
There are plus signs in the final line of code
8.

Which line contains a syntax error?

a)

print("Hello")

b)

sprint("Hello")

c)

print("hello")

d)

print("HELLO")

9.
What is iterative testing?
a)
Testing completed after an error is found
b)
Random tests on a computer program
c)
Test completed as the program is being coded
d)
Test which are planned
10.
Testing while coding a program is called?
a)
Development Testing
b)
Coder Testing
c)
Terminal Testing
d)
Iterative Testing
11.

What is a null value test on data entry?

a)

Data that does not have a value such as a name or phone number

b)

Data that is not entered in order to test how the program responds

c)

Data that has a value of zero

d)

Data that is incorrect

12.
What is the purpose of testing?
a)
To identify errors
b)
To identify issues that may occur when a customer uses the program
c)
To test the security of the program
d)
All of the above