NEW
Font size
S
M
L
XL
WorksheetsGCSE J277 - 2.3 - Producing Robust Programs Mega Quiz
Total questions: 80
Worksheet time: 40mins
Name
Class
Date
1.
What programming feature checks inputs meet a defined criteria
a)
Authentication
b)
Commeting
c)
Validation
d)
Form
2.
Which of these is not a validation check
a)
Format Check
b)
Type Check
c)
Range Check
d)
Program Check
3.
Checks data isn't too short or too long
a)
Check Digit
b)
Format Check
c)
Length Check
d)
Lookup Table
4.
The last one or two digits in a code are used to check the other digits are correct
a)
Check Digit
b)
Format Check
c)
Length Check
d)
Lookup Table
5.
Looks up acceptable values in a table
a)
Check Digit
b)
Format Check
c)
Length Check
d)
Lookup Table
6.
Checks the data is submitted in the right format
a)
Check Digit
b)
Format Check
c)
Length Check
d)
Lookup Table
7.
Checks that data has been entered into a field
a)
Presence Check
b)
Check Digit
c)
Format Check
d)
Range Check
8.
Checks that data falls within a specified range
a)
Presence Check
b)
Check Digit
c)
Format Check
d)
Range Check
9.
Which validation: Checking a password is 6 letters long
a)
Check Digit
b)
Format Check
c)
Length Check
d)
Lookup Table
10.
Which validation: A barcode scanner checking a barcode is correct
a)
Check Digit
b)
Format Check
c)
Length Check
d)
Lookup Table
11.
Which validation: Making sure a national insurance number is in the form LL 99 99 99 L
a)
Check Digit
b)
Format Check
c)
Length Check
d)
Lookup Table
12.
Which validiation: There are only seven possible days of the week
a)
Check Digit
b)
Format Check
c)
Length Check
d)
Lookup Table
13.
Which validation: Making sure data is entered into a particular field
a)
Presence Check
b)
Check Digit
c)
Format Check
d)
Range Check
14.
Which validation: Hours worked must be less than 50 and more than 0
a)
Presence Check
b)
Check Digit
c)
Format Check
d)
Range Check
15.
What is data validation
a)
Checking data entered is wrong
b)
Checking data entered is correct
c)
Checking data entered is sensible, reasonable and correct
d)
Checking data is okay
16.
Which of these authentication methods is the most secure
a)
Password
b)
Username and Password
c)
Key Card
d)
Physical and Code
17.
Which of these is not an example of validation
a)
Checking the number entered is 2 digits
b)
Asking the user to enter the same data in twice
c)
Use of a lookup table
d)
Use of a presence check
18.
What does a range check do
a)
Checks data across a range of numbers
b)
Where three types of data are used
c)
Checks that the data is in the correct format
d)
Checks the data is within an accpetable range
19.
Which one of these is not a method for planning for misuse
a)
Limiting the number of login attempts
b)
Requesting a password and username
c)
Not validating the data entry
d)
Authentication
20.
Data Verification requires the user to enter the same data twice
a)
True
b)
False
21.
Which of the following isn't a method of improving maintainability in a program
a)
Comments
b)
Indentations
c)
Meaningful Variable Names
d)
Functions and Procedures
22.
Which of the following explain key features of what a program does
a)
Comments
b)
Indentations
c)
Meaningful Variable Names
d)
Functions and Procedures
23.
Which of the following gives suitable names to locations in memory
a)
Comments
b)
Indentations
c)
Meaningful Variable Names
d)
Functions and Procedures
24.
Which of the following allows you to track the flow of data in a program more easily
a)
Comments
b)
Indentations
c)
Meaningful Variable Names
d)
Functions and Procedures
25.
Which of the following shows parts of selection and iteration more easily
a)
Comments
b)
Indentations
c)
Meaningful Variable Names
d)
Functions and Procedures
26.
d would be a good example of a variable name for storing distance
a)
True
b)
False
27.
Could cause a sytnax error in your program if not done correctly
a)
Comments
b)
Indentations
c)
Meaningful Variable Names
28.
Code which isn't indented is easier to debug
a)
True
b)
False
29.
Comments should explain what key features of your program does
a)
True
b)
False
30.
Comments don't help visually divide section of a program
a)
True
b)
False
31.
Use of functions and procedures helps eliminate duplicate code
a)
True
b)
False
32.
Which of these describes maintainability
a)
Making the program easier to use for the user
b)
Making the code easier to read for the user
c)
Making the code easier to read for the programmer
d)
Making the program easier to use for the programmer
33.
In order to explain what you mean to another programmer, you use
a)
Comments
b)
Indentations
c)
Meaningful Variable Names
d)
Functions and Procedures
34.
Why do we use code indentation
a)
To group together a function
b)
The code requires it for sytnax purposes
c)
To make the code easier to read
d)
All of the above
35.
Why should comments be used within a program
a)
To help describe what code and structures are expected to do
b)
To remind the developer when they finished each day
c)
To include what tests must be carried out on a program
d)
To include what they've missed out
36.
Why do programmers want code to be maintainable
a)
To make it easier to edit by other programmers
b)
To lessen the chances of mistakes being made
c)
To make it easier to make corrections and additions
d)
All of the above
37.
Some programming languages do these automatically
a)
Comments
b)
Indentations
c)
Meaningful Variable Names
d)
Functions and Procedures
38.
Comments serve no purpose when the program is running
a)
True
b)
False
39.
Indenting code makes it easier to debug
a)
True
b)
False
40.
Functions and Procedures don't remove repeating code
a)
True
b)
False
41.
print(Hello",name)
a)
Syntax Error
b)
Logic Error
42.
print("In 5 years time, you will be", age * 5)
a)
Syntax Error
b)
Logic Error
43.
if i in range(0,2):
a)
Syntax Error
b)
Logic Error
44.
if num < 5:
print("The number is larger than 5")
a)
Syntax Error
b)
Logic Error
45.
Once a logical condition in an IF statement is TRUE, all other statements are are ignored
a)
True
b)
False
46.
Syntax errors are always spotted when the program is compiled or interpreted
a)
True
b)
False
47.
A program won't run if there is a logic error
a)
True
b)
False
48.
Syntax errors are caused by incorrectly typed source code
a)
True
b)
False
49.
Modern IDEs can spot syntax errors are you type your code
a)
True
b)
False
50.
Which statement best describes a logic error
a)
An error in a program caused by hardware failure
b)
An error in the program caused by mis-spelt instructions
c)
An error that produces incorrect outputs but not crash
d)
An error that causes it to crash
51.
Which statement contains a syntax error
a)
print("Hello")
b)
PRINT("Hello")
c)
print("hello")
d)
print("HELLO")
52.
Which statement contains a syntax error
a)
pounds = pence * 100
b)
pounds = pence / 100
c)
pounds = pence x 100
d)
pounds = 100 / pence
53.
A program may never contain both syntax and logic errors
a)
True
b)
False
54.
Which of these expressions will generate a logic error when the expected output is 10
a)
answer = {2 + 3} * 2
b)
answer = 2 + 3 * 2
c)
answer = (2 + 3) * 2
d)
answer = 2 + 3 x 2
55.
Using incorrect comparison operators such as < or > is an example of what type of error
a)
Syntax Error
b)
Logic Error
56.
Using incorrectly named programming functions is an example of what type of error
a)
Syntax Error
b)
Logic Error
57.
These types of errors can only be detected by the programmer themselves
a)
Syntax Error
b)
Logic Error
58.
These types of errors are generally detected by the IDE
a)
Syntax Error
b)
Logic Error
59.
Which type of errors are easier to identify
a)
Syntax Error
b)
Logic Error
60.
A program will still run even with this type of error
a)
Syntax Error
b)
Logic Error
61.
Test data is out of range of what is accepted and should be rejected
a)
Valid
b)
Out of range
c)
Extreme
d)
Invalid
62.
Test data that should be rejected because it is the wrong type
a)
Valid
b)
Out of range
c)
Extreme
d)
Invalid
63.
Test data that is correct and should be accepted by the system
a)
Valid
b)
Out of range
c)
Extreme
d)
Invalid
64.
Test data that is valid, but at the boundaries of the range of acceptable input
a)
Valid
b)
Out of range
c)
Extreme
d)
Invalid
65.
Test data can also include null values (not entering data to see what happens)
a)
True
b)
False
66.
Example of a valid test for the range 1 to 10
a)
5
b)
12
c)
10
d)
Five
67.
Example of an out of range test for the range 1 to 10
a)
5
b)
12
c)
10
d)
Five
68.
Example of an invalid test for the range 1 to 10
a)
5
b)
12
c)
10
d)
Five
69.
Example of an extreme test for the range 1 to 10
a)
5
b)
12
c)
10
d)
Five
70.
When is terminal testing carried out
a)
Before you start
b)
At the end
c)
During the project
d)
After the design section
71.
When is iterative testing carried out
a)
Before you start
b)
At the end
c)
During the project
d)
After the design section
72.
It isn't necessary to do multiple tests of each test type
a)
True
b)
False
73.
Which data would be most suitable to test for an incorrect piece of data being entered for age
a)
44
b)
1
c)
Forty Five
d)
32
74.
Example of a valid test for a username between 5 to 10 letters
a)
josmith
b)
smith
c)
jo
d)
123456
75.
Example of an out of range test for a username between 5 to 10 letters
a)
josmith
b)
smith
c)
jo
d)
123456
76.
Example of an invalid test for a username between 5 to 10 letters
a)
josmith
b)
smith
c)
jo
d)
123456
77.
Example of an extreme test for a username between 5 to 10 letters
a)
josmith
b)
smith
c)
jo
d)
123456
78.
Both iterative and terminal testing must be carried out to ensure a program is working
a)
True
b)
False
79.
It isn't important to test what happens when null values are entered
a)
True
b)
False
80.
It's necessary to do multiple tests of each test type
a)
True
b)
False
Reset
