Font size
WorksheetsPaper 2 Revision
Total questions: 66
Worksheet time: 41mins
Which happens during abstraction?
Identify the essential information
Ignore the non-essential information
Break the problem down into smaller tasks
What happens during decomposition?
Ignore non-essential information
Break the problem down into smaller tasks
When designing a building that must be accessible for wheelchairs, which of the following characteristics is non-essential?
Number of doors
Number of walls
Number of wall paintings
Decomposition allows each task to become _______
More manageable
Smaller
More difficult
A school database has lots of information on students, the data manager needs to use abstraction. What data should she leave out?
Age
Guardian's phone numbers
Classes
Eye colour
What is this symbol used for in a flowchart?
A decision/question
A task to carry out
An input
Yes
19
Which shape would you use to perform a test on a variable?
Top (box)
Middle (parallelogram)
Bottom (diamond)
Look at the Algorithm Below. In the corresponding Trace Table, what value should 'A' be?
1
3
5
7
Look at the Algorithm Below. In the corresponding Trace Table, what value should 'B' be?
1
3
5
7
Look at the Algorithm Below. In the corresponding Trace Table, what value should 'C' be?
1
3
8
13
Look at the Algorithm Below. In the corresponding Trace Table, what value should 'D' be?
11
13
8
1
Look at the Algorithm Below. In the corresponding Trace Table, what value should 'E' be?
3
5
8
13
Which type of sort algorithm is this?
Bubble
Merge
Insertion
Which data type would you use to store:
Someone's age
String
Integer
Float
Boolean
Which data type would you use to store:
Someone's name
String
Integer
Float
Boolean
What does 'Defensive Design' mean?
A method of planning a program using shapes.
A method of planning a program using plain English.
A method of designing a program so that it functions properly and doesn't crash.
A method of checking that an input matches the criteria.
What is the most common method of Authentication?
Biometrics.
Passwords.
An e-mail address.
A username.
What are the features of 'Well-Maintained Code'?
Comments and global variables.
No indentation.
Comments, indentation and suitably named variables.
Local variables only.
Harry
Boundary
Erroneous / Invalid
18
Erroneous / Invalid
Boundary
Choose the correct definition of a logic error
The program will run but will produce an unexpected result
A grammatical error that will cause the program to crash
An error caused by an incorrect spelling
The program does not make logical sense
Choose the correct definition of a syntax error
The program contains an error but will not crash
A grammatical error that will cause the program to crash
An error caused by an incorrect spelling
The program does not make logical sense
Identify the syntax error in this code
admin should be within quotation marks
print has been spelt incorrectly
username has been used too many times
!= is not a correct math operator
Which logic gate is this?
(a)
Which logic gate is this?
(a)
Which 2 gates have been used?
AND and NOT
OR and AND
OR and NOT
NOT and OR
What is the correct notation for this logic circuit?
C AND (A OR B)
C OR (A AND B)
Which 2 gates have been used?
AND and NOT
OR and AND
OR and NOT
NOT and OR
Select two advantages of high level languages
Easier to learn
Executes very fast
The code will occupy less memory
Programs can be written faster
Which two statements are true of a compiler?
Creates a final error report containing all errors
Displays the error as soon as it is detected
The program must be run every time it is used
Produces an executable file
A compiler translates the entire program at once
True
False
Which of the following is not a feature of an Integrated Development Environment (IDE)?
Editor
Run-Time Environment
Debugger
Output Window
Spell Check
An IDE makes it easier for the programmer to w? and t? their code
give both words with a space in between (e.g. answer1 answer2)
(a)
If asked to give 2 features of an IDE, you would gain 2 marks for saying "auto-fill and bracket matching"
True
False
Which of the following IDE features allows the user to write their code?
Editor
Output Window
Debugger
Breakpoints
Which of the following IDE features informs the user of any mistakes they have made in their code?
Editor
Run-Time Environment
Debugger
Stepping
What is the output of the following code?
count
0,1,2,3,4,5,6,7,8,9
!= means 'does not equal'
True
False
Which of the following is a subroutine not designed to do?
Avoid the user needing to write the same instructions multiple times
Allow multiple programmers to work on different elements of the same program
Reduce errors by troubleshooting separate elements of code
Make it easier for the computer to run
What is the name of the subroutine?
happyBirthday
person
def
What is the name of the parameter?
happyBirthday
person
def
What is the name of the subroutine?
addNumbers
num1
num2
total
num1 and num2 are the parameters
True
False
Which subroutine will return a value back to the program?
Procedure
Function
What is the index of the item bread in the list shoppinglist?
shoppinglist = ["milk", "eggs", "sugar", "bread", "cake"]
4
3
What is the index of the item milk in the list shoppinglist?
shoppinglist = ["milk", "eggs", "sugar", "bread", "cake"]
0
1
What would I need to type in for the program to display Correct?
A
B
Neither
Both
Which response will be displayed?
You are too young
You are old enough
Which command is used within a selection statement to give a default response?
(a)
