Font size
WorksheetsOCR Paper 2 Revision
Total questions: 100
Worksheet time: 53mins
Identify the search algorithm
Random search
Binary search
Denary search
Next Item search
Identify the description of a linear search
Put the elements in order, check each item in turn
Put the elements in order, compare to the middle value, split the list in order and repeat
Elements do not need to be in order, check each item in turn
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
Identify the description of a binary search
Put the elements in order, check each item in turn
Put the elements in order, compare to the middle value, split the list in order and repeat
Elements do not need to be in order, check each item in turn
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
Define the term computational thinking
Using a computer
Developing an algorithm to solve a problem
Making a computer use artificial intelligence
Google is computational thinking
Which of the following is not a component of computational thinking?
Abstraction
Decomposition
Typing
Algorithmic thinking
A linear search is to be performed on the list, how many comparisons would it take to find the number 1?
1
2
3
4
A binary search is to be performed on the list, how many comparisons would it take to find the number 9?
0-1
2-3
4-5
It can't find the number 9
Identify the search performed by the algorithm:
Linear
Binary
Both linear and binary
Neither, it does not work
Which of the following is not a sorting algorithm?
Bubble
Insertion
Binary
Merge
Which sorting algorithm is described by: moving through a list repeatedly, swapping elements that are in the wrong order.
Merge
Bubble
Insertion
None of the above
Which sorting algorithm is described by: split a list into individual lists, then combine these, two lists at a time.
Merge
Bubble
Insertion
None of the above
Which sorting algorithm is described by: take each item in turn, compare it to the items in the sorted list and place it in the ordered position in the sorted list.
Merge
Bubble
Insertion
None of the above
The two lists are to be merged, which element first goes into the new merged list
0
1
2
3
The list is to be sorted using a bubble sort. What will the list look like after the first iteration through the list.
Which sorting algorithm needs to go through the list repeatedly?
Merge
Bubble
Insertion
None of them do
Which sorting algorithm splits a list of items into individual lists.
Merge
Bubble
Insertion
None of them do
Process
What is this flowchart symbol called?
connector
decision box
process box
subroutine box
Which of the following is not a type of test data?
Check
Normal
Invalid
Boundary
Boundary tests check the minimum and maximum values of an input.
True
False
What is iterative testing?
Testing completed after an error is found
Rom tests on a computer program
Tests completed as the program is being coded
Tests which are planned
Terminal testing is.....
when you test code from a networked terminal
when a terminal error causes the code to crash
when to carry out final testing when the code is complete
when you code is so bad to need to delete it and start again
What type of error would result from you attempting to find the area of a circle, but you end up using the wrong equation.
Logic Error
Semantics Error
Syntax Error
Which of the following is a syntax error?
Attempting to divide by 0
Forgetting a colon at the end of a statement where one is required.
Forgetting to divide by 100 when printing a percentage amount.
A user attempts to enter in an incorrect password, what method would identify this issues?
Data Validation
Authentication
Program Comments
Indentation
What is data validation?
Checking that the data entered is wrong
Checking that the data entered is correct
Checking that the data entered is sensible or reasonable
Leo wants to create a subroutine that will roll a dice. Which syntax is correct?
def dice roll ():
def diceroll ()
def diceroll ():
def diceroll []:
Which of the following Validation Checks is the most suitable for checking a text box has been filled in?
Range Check
Presence Check
Format Check
Check Digit
What are the features of 'Well-Maintained Code'?
Comments and global variables.
No indentation.
Comments, indentation and suitably named variables.
Local variables only.
A user attempts to enter in an incorrect password, what method would identify this issues?
Data Validation
Authentication
Program Comments
Indentation
What is data validation?
Checking that the data entered is wrong
Checking that the data entered is correct
Checking that the data entered is sensible or reasonable
What is the correct term for word shown in brackets?
Argument
Function
Variable
Parameter
Which of the following statements about the program shown here, is true?
This program uses a subroutine
This program uses a function
This program uses parameters
This program uses arguments
Complete the following sentence by choosing the correct (most appropriate) word from below
"To get a subprogram to run, we have to ________ it from somewhere in the program
RUN
CALL
PERFORM
EXECUTE
What is the difference between a subroutine and a function?
They are the same thing
A subroutine passes values back out to the program, a function does not
A function passes values back out to the program, a subroutine does not
A function can run without being called
While defining a function which of the
following symbols is used at the end of the line of code?
;
.
$
:
When a program runs it asks the user to enter their full name. Which is an example of Valid data?
Mr Jones
Sarah
Sarah Jones
Mrs Jones
What is maintainability?
Checking programs work
Making your code easy to follow, e.g. with comments
Testing a program for errors
Training staff to use the program correctly
Which of these is not a method for authenticating a user?
Password
Password and Username
Finger print scanner
Encryption
Both inputs must be true for the output to be true
AND gate
OR gate
NOT gate
NOR gate
NAND gate
Either inputs or both can be true for output to be true
OR gate
AND gate
NOT gate
NOR gate
NAND gate
The output is the opposite of the input.
NOT gate
OR gate
AND gate
NOR gate
NAND gate
The symbol for NOT in a Boolean expression.
¬
^
v
The symbol for AND in a Boolean expression.
^
v
¬
The symbol for OR in a Boolean expression.
v
^
¬
What is this diagram called?
Truth Table
Gate Table
Output Table
Input Table
What is the boolean expression for this logic circuit?
Q = NOT (A OR B)
Q = NOT A AND B
NOT A OR B = Q
Q = (NOT A) OR B
This is the truth table for which logic gate?
Which of these are boolean operators, implemented in the computer as logic gates?
Check all that apply
NOT
MOD
OR
AND
DIV
In this logic circuit, what is the output Q if the inputs A and C are 1?
0
We can't say
1
This is the truth table for which logic gate?
AND
OR
NOT
Translates low level assembly language mnemonic into machine code
Assembler
Compiler
Interpreter
Translates source code from high level languages into object code and then into machine code
Assembler
Compiler
Interpreter
Program is translated line by line as the program is running
Assembler
Compiler
Interpreter
What is a MNEMONIC?
A single action that can be performed by a computer.
A symbol/short phrase that represents an instruction in assembly code.
A high level language keyword.
A register used inside a CPU A register used inside a CPU.
Which of the following is NOT a translator?
Assembler
Compiler
Interpreter
Executable
What is machine code?
Instructions and data in binary
Serial number of the CPU
Instructions and data in human readable form
Instructions and data in assembly code mnemonics
What does a translator do?
Swaps between different high-level languages
Swaps between different machine code types
Converts pseudocode to machine code
Converts programs to machine code
Why do we need translators?
Computers only understand program's in assembly code.
Computers only understand program's in high-level language.
Computers only understand Norwegian.
Computers only understand program's in machine language.
You do not get access to the source code with compiled code.
True
False
This is where the code is written.
Translator
Run time environment
Editor
Error diagnostics
Notepad
Uses Mnemonics as command words (for example LDA, STA and ADD)
High level code
Low level code
Assembly language
What does IDE stand for?
Internal Development Environment
Integrated Design Environment
Internal Design Environment
Integrated Development Environment
Machine code is used in which generation of a programming language? (1-3)
1st Generation
2nd Generation
3rd Generation
4th Generation
"Iteration" refers to...
Storing data in variables
Creating variables
Repeating sections of code
Checking a condition to see which piece of code to run next
What is the term for a named block of code that can be executed by writing its name.
Subroutine
Condition
Selection
What is the correct way to start a procedure?
def
Def
define
(def)
What is a benefit of using Subroutines?
More efficient as the code is modularised
Takes longer to write
Makes the code look longer
The program executes better
if age is less than 20 then
Hello world!
Hello world!
Hello world!
Hello world!
Hello world!
......(repeated continuously)
holds whole numbers
holds a decimal point in a number
What is the character code for 'f'?
Choose three properties of a variable
Has a data type
Has a value
Has a name
Has a length
Has a return value
Choose all the rules that are correct for naming variables
Must not begin with a number
Must only contain a-z and 0-9 characters
Must have spaces
Must be in lower case
In what way is a constant different from a variable?
It can not change its value during program execution
It can store more than one value
It can only be used in the global scope
Its name must be written in UPPER CASE
The process of giving a value to a variable?
Assignment
Initialisation
Coercion
Declaration
Example of ... ?
Selection
IIteration
Sequence
Iteration
A special type of loop that never ends?
Infinite loop
Recursive loop
Nested loop
Unconditional loop
