wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

OCR Pretest Section 2

Total questions: 120

Worksheet time: 1hrs 2mins

Name
Class
Date
1.

Which of the following is not done by abstraction?

a)

Identifies essential details

b)

Disregards non-essential information

c)

Breaks the problem down into smaller tasks

2.

Which of the following is not done by decomposition?

a)

Allows multiple people to work on the problem together

b)

Disregards non-essential information

c)

Breaks the problem down into smaller tasks

3.

When drawing a dog, which of the following characteristics is non-essential?

a)

Dogs have 4 paws

b)

Dogs have fur

c)

Dogs have brown fur

4.

When designing a building that must be accessible for wheelchairs, which of the following characteristics is non-essential?

a)

Number of doors

b)

Number of walls

c)

Number of wall paintings

5.

One advantage of abstraction is that it means no mistakes can be made

a)

True

b)

False

6.

You could use abstraction to replace specific objects with simple shapes

a)

True

b)

False

7.

This is a good example of decomposition

Sit down

Do homework

a)

True

b)

False

8.

Decomposition allows each task to become _______

a)

More manageable

b)

Easier

c)

Quicker

9.

Decomposition allows the entire task to be completed as _____

a)

A Team

b)

A Whole

c)

Quickly as possible

10.

Abstraction and Decomposition are separate concepts, you would usually choose to do either one or the other

a)

True

b)

False

11.

It is always necessary to decompose a task

a)

True

b)

False

12.

Abstraction and Decomposition are examples of...

a)

Computational Thinking

b)

Algorithmic Thinking

c)

Computer Science

d)

Logical Reasoning

13.

What is pattern recognition?

a)

Breaking down a complex problem into smaller problems

b)

Looking for similarities among and within problems

c)

Building models from patterns

14.

Why do we need to look for patterns in problems?

a)

Patterns make it easier for us to solve complex problems

b)

We don't need to look for patterns

c)

Patterns make it more difficult complex problems

15.

If you don't look for patterns in a problem, your solution might be _____

a)

Wrong

b)

Inefficient

c)

Too slow

16.

Identifying the steps involved in solving a problem

a)

Abstraction

b)

Decomposition

c)

Pattern Recognition

d)

Algorithmic Thinking

17.
Which of the following is an example of thinking computationally?
a)
Planning out your route when going to meet a friend
b)
When going to meet a friend, wandering around until you find them
c)
When going to meet a friend, asking a parent to plan your route for you
18.

Looking for similarities and trends within a problem

a)

Abstraction

b)

Decomposition

c)

Pattern recognition

d)

Algorithmic Thinking

19.

What is a flowchart?

a)

A visual representation of an algorithm.

b)

A diagram that shows abstraction.

c)

A series of shapes.

20.

A school database has lots of information on students, the data manager needs to use abstraction. What data should she leave out?

a)

Age

b)

Guardian's phone numbers

c)

Classes

d)

Eye colour

21.

What is an algorithm?

a)

Patterns and trends used to solve a problem

b)

A set of step-by-step instructions to resolve a problem

c)

A programming language

22.

What are algorithms used for?

a)

To plan out the solution to a problem

b)

As a platform to program a solution

c)

To test a solution to a problem

23.

Which of these is NOT an algorithm?

a)

Following recipe instructions

b)

Working out how an engine works

c)

Tying your shoelaces

d)

Making a cup of coffee

24.

What does an algorithm need to be (choose more than 1)

a)

Clear instructions

b)

Exact

c)

Easy to understand

d)

Complex

25.

When can an algorithm be used?

a)

Only with computers

b)

For programming

c)

To design a solution to any problem

26.

What is decomposition?

a)

Searches the computer's memory for data

b)

Repeats a program

c)

Getting small part of a problem and adding them together

d)

Breaking down a complex problem

27.

What is abstraction?

a)

Removal of certain details, keeping relevant the information

b)

Stores data in a program for retrieval

c)

Freedom from representing art

d)

Detects errors while program is running

28.

If it is AFTER 7am, what do you need to do?

a)

Take the bus

b)

Take the subway

c)

Check the time

d)

Leave home

29.

What should be considered when designing an algorithm?

a)

If there is more than one way to solve the problem

b)

If the correct hardware is being used

c)

If the correct software is being used

30.

You are at the yellow arrow, pointing in the direction indicated. How would you move to fill in the 2 black squares?

a)

Straight, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square

b)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 1, Fill Square

c)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn right, Straight x 1, Fill Square

d)

Straight x 2, Turn right, Straight x 1, Fill Square, Straight x 2, Turn left, Straight x 2, Fill Square

31.

What is an algorithm?

a)

A flowchart

b)

Step by step instructions used to solve a problem

c)

A decision

d)

A flowchart or pseudocode

32.

What are the three algorithm constructs?

a)

Sequence, Selection, Iteration

b)

Input, Process, Output

c)

Input/output, decision, terminator

d)

Loop, input/output, process

33.

What is the difference between a flowchart and pseudocode?

a)

A flowchart is diagrammatic whilst pseudocode is written in a programming language

b)

A flowchart is textual but pseudocode is diagrammatic

c)

A flowchart is a diagrammatic description of an algorithm whilst pseudocode is a textual description of an algorithm

d)

A flowchart and pseudocode are the same thing

34.

In a flowchart an input or output instruction is represented by:

a)

A rectangle

b)

A rhombus

c)

A parallelogram

d)

A circle

35.

In a flowchart a calculation (process) is represented by:

a)

A rectangle

b)

A rhombus

c)

A parallelogram

d)

A circle

36.

In a flowchart a decision (selection) is represented by:

a)

A rectangle

b)

A rhombus

c)

A parallelogram

d)

A circle

37.

An algorithm asks a user to enter their age, the age is read into the system and the system outputs a 'Thank You' message.

This is an example of which of the algorithm construct?

a)

Decision (Selection)

b)

Loop (Iteration)

c)

Order (Sequence)

d)

All of the above

38.

An Algorithm asks the user to enter their scores for 5 different tests.

This is an example of which of the algorithm constructs?

a)

Decision (Selection)

b)

Loop (Iteration)

c)

Order (Sequence)

d)

All of the above

39.

An Algorithm asks the user to enter their gender (M or F) and prints out a different comment depending on what they entered.

This is an example of which of the algorithm constructs?

a)

Decision (Selection)

b)

Loop (Iteration)

c)

Order (Sequence)

d)

All of the above

40.

What is a "Variable" ?

a)

A value that can be changed and manipulated as an algorithm is running

b)

A value that cannot be changed and manipulated as an algorithm is running

41.

Variables are assigned an identifier. The identifier should be:

a)

not too long

b)

have a sensible name

c)

not start with a number

d)

not start with a capital letter

e)

all of the above

42.

firstName is and example of what commonly used way to name a variable

a)

camelcase

b)

snakecase

c)

linecase

d)

hillcase

43.

first_name is and example of what commonly used way to name a variable

a)

camelcase

b)

snakecase

c)

linecase

d)

hillcase

44.

What type of operators are + - * / DIV MOD ^

a)

Arithmetic

b)

Relational

c)

Booleon

45.

What type of operators are == != < > <= >=

a)

Arithmetic

b)

Relational

c)

Booleon

46.

What type of operators are AND OR NOT

a)

Arithmetic

b)

Relational

c)

Booleon

47.

Booleon operators are also know as:

a)

Logical operators

b)

Combination operators

c)

Algorithmic operators

d)

Flow operators

48.

This an example of:

a)

a nested if

b)

a combined if

c)

a multiple if

d)

a sequence if

49.

Here is an algorithm used to calculate whether a worker should get a bonus.

How much bonus would they get if their WagesEarned = 200

a)

50

b)

250

c)

200

d)

150

50.
What would be the output of this flowchart if the student scored 89?
a)
Fail
b)
Pass
c)
Merit
d)
Distinction
51.
Identify a variable within this flowchart.
a)
INPUT
b)
Start
c)
12
d)
RESULT
52.
What is the Output if the user enters:
Yes
a)
Leave umbrella at home
b)
Take an umbrella
53.
What is the Output if the temperature is:
19
a)
Below Freezing
b)
Above Freezing
54.
This data type is used to store whole numbers
a)
Integer
b)
Double
c)
Boolean
d)
String
55.
Which data type is used to store:
"D"
a)
Character
b)
String
c)
Integer
d)
Double
56.
This data type is used to store a mixture of letters and numbers and symbols.
a)
String
b)
Character
c)
Boolean
d)
Integer
57.

The following is true about Top-down approach

a)

The Main procedure is defined first, with other subs to follow

b)

The detailed list of all operations is drawn up first, before we can start planning

c)

We start from the top of the program and complete the algorithm by getting to the bottom of it

d)

Functions can’t be included as they can’t be directly called by procedures.

58.

Structured code has the following benefit

a)

Reduces the number of lines of code

b)

Improves efficiency

c)

Makes code easier to read and debug

d)

All of these options are true

59.

Variable scope refers to

a)

Variable data type

b)

Variable identifier

c)

Logic errors associated with a variable

d)

Different use of global and local variables

60.

The advantages of parameter passing don’t include this

a)

The same subprogram can be reused in more cases

b)

Parameter passing makes it easier to use global variables

c)

More flexible coding

d)

Can cut down on the use of wasteful global variables

61.

The main difference between procedures and functions is

a)

Procedures are usually longer and have more instructions

b)

Functions use parameter passing, while procedures don’t

c)

Functions are more difficult to debug

d)

Functions return values, while procedures don’t

62.

When a variable first appears outside any subprograms

a)

It is a global variable

b)

It is a local variable

c)

It is a parameter variable

d)

It is not a valid variable

63.

Converting procedures to functions usually causes these effects

a)

Shorter code

b)

Slows the program down

c)

Reduction of the number of global variables, more parameter passing

d)

Makes it more difficult to use selection

64.

Trying to use a local variable from outside its scope will cause

a)

A global variable to be overwritten by it

b)

A wrong procedure to run

c)

A crash with a report “Unknown variable”

d)

A logical error

65.

Identify a correct statement:

a)

Global variables waste memory

b)

showResults(choice,cutoff) is a function

c)

An array index is its length

d)

Nested iteration structures can share the same counter variable

66.

ELSE IF keyword is used when

a)

Our selection needs to work with more than three choices

b)

Our selection needs to work with more than two choices

c)

SELECT CASE/SWITCH statement is not available

d)

Using conditional loops

67.

Identify a correct statement:

a)

SELECT CASE is more popular then IF/ELSE IF/ELSE

b)

We can’t have more than 5 levels of nested IF/ELSE IF/ELSE

c)

SELECT CASE is the same concept as SWITCH

d)

FOR loops are known as condition-controlled iteration

68.

In the nested selection statements

a)

The inside selection structure gets executed first

b)

The outside selection structure gets executed first

c)

AND and OR are to be avoided

d)

Integers must be used instead of Booleans

69.

The flowchart shape for selection is

a)

Parallelogram

b)

Square

c)

Diamond

d)

Rounded rectangle

70.

Identify an invalid expression

a)

ELSE x=45 THEN

b)

IF x>9 and x<100 THEN

c)

Any FOR loop can be rewritten as a WHILE loop

d)

PROCEDURE Test(a AS INTEGER)

71.

When a FOR loop increments a counter by a number other than one, this is called

a)

Increment

b)

Decrement

c)

Stepping

d)

Condition

72.

For exiting FOR loops early we use

a)

Nested iteration

b)

BREAK clause

c)

HALT clause

d)

Conditional loops

73.

The following is not true about arrays

a)

All array elements have the same data type

b)

Arrays have fixed size that can’t be easily changed during a program run

c)

Names[LEN(Names)] is the last element of the array Names

d)

The use of iteration makes arrays less relevant

74.

The following is not a correct statement involving arrays

a)

ARRAY Test[40]

b)

ARRAY Test[56,34,89,8]

c)

ARRAY:= Test[40]

d)

NewArray:=SPLIT(MID(“War and Peace”,2,5),”,”)

75.

The following is not a correct statement involving arrays

a)

J:=Pupils[5,8]

b)

Nums[i,j]:=Nums[i-1,j]

c)

Nums[i,j]:=Nums[i-1]

d)

B:=getChoices(45)

76.
Variables cannot be changed.
a)
False
b)
True
77.
Constants cannot be changed.
a)
True
b)
False
78.
Variable names can't start with a number.
a)
True
b)
False
79.

5.23 would be stored as:

a)

Integer

b)

Real Number

c)

String

d)

Character

e)

Boolean

80.
Comparison Operators
What is >= ?
a)
Greater than
b)
Less than
c)
Greater than or equal to
d)
Less than or equal to
81.
Comparison Operators
What is < ?
a)
Greater than
b)
Less than
c)
Greater than or equal to
d)
Less than or equal to
82.

Comparison Operators

What is A > B?

a)

A greater than B

b)

A less than B

c)

Greater than or equal to

d)

Less than or equal to

83.
Comparison Operator
What is <= ?
a)
Greater than
b)
Less than
c)
Greater than or equal to
d)
Less than or equal to 
84.
Logical Operators
What is && ? 
a)
And
b)
Or
c)
Not
d)
Less than
85.
Comparison Operators
What is != ?
a)
Equal to
b)
Equal value and equal type
c)
Not equal
d)
Not equal value or not equal type
86.
Comparision Operators
What is == ? 
a)
Equal to 
b)
Equal value and equal type
c)
Not equal
d)
Not equal value or not equal type
87.

Arithmetic Operators What is a/c ? 

a)

Addition

b)

Subtraction

c)

Division

d)

Modulo

88.

5 would be stored as:

a)

Integer

b)

Real Number

c)

String

d)

Character

e)

Boolean

89.

M / F would be stored as:

a)

Integer

b)

Real Number

c)

String

d)

Character

e)

Boolean

90.

"The cat sat on the mat" would be stored as:

a)

Integer

b)

Real Number

c)

String

d)

Character

e)

Boolean

91.

Conversion of one data type to another e.g.

age = "30" # this is a string!

YearsOld=int(age)


is known as...?

a)

Declaring

b)

Assigning (or Assignment)

c)

Casting

d)

Concatenation

92.

What is selection?

a)

Instructions are only executed if a TRUE or FALSE condition is met

b)

The program chooses to execute whatever it pleases

c)

Instructions are executed one at a time in list order

d)

Instructions are repeated until a condition is met, creating a loop

93.

What is sequencing?

a)

Instructions are only executed if a TRUE or FALSE condition is met

b)

The program chooses to execute whatever it pleases

c)

Instructions are executed one at a time in list order

d)

Instructions are repeated until a condition is met, creating a loop

94.

What is iteration?

a)

Instructions are only executed if a TRUE or FALSE condition is met

b)

The program chooses to execute whatever it pleases

c)

Instructions are executed one at a time in list order

d)

Instructions are repeated until a condition is met, creating a loop

95.

AND, OR, NOT are all examples of what?

a)

Boolean Operators

b)

Arithmetic Operators

c)

Strings

d)

Data Types

96.

What does AND do?

a)

Both conditions must be met to return true

b)

Only one condition must be met to return true

c)

No conditions must be met to return true

d)

Inverses the condition

97.

What does OR do?

a)

Both conditions must be met to return true

b)

Only one condition must be met to return true

c)

No conditions must be met to return true

d)

Inverses the condition

98.

What does NOT do?

a)

Both conditions must be met to return true

b)

Only one condition must be met to return true

c)

No conditions must be met to return true

d)

Inverses the condition

99.

What does the following code do?

print("find me paper")

a)

Prints a message to the screen

b)

Sends a message to the nearest printer

c)

Iterates through a loop

d)

Takes an input from the user

100.

What does the following code do?

if goodGrades == TRUE then

print("Congratulations!")

end if

a)

If a condition is met, prints a message to the screen

b)

Prints a message

c)

Creates a loop

d)

Take an input from the user

101.

What does this code do?


while answerIsWrong == TRUE

print("What is the answer?")

a)

Creates a loop

b)

Takes an input from the user

c)

Creates a string

d)

Calculates Pi

102.

High level languages are easy to understand...

a)

True

b)

False

103.

Is used to translate Assembly Code

a)

Assembler

b)

Compiler

c)

Interpreter

104.

Is not used to translate High Level Languages

a)

Assembler

b)

Compiler

c)

Interpreter

105.

Translates entire source code in one go

a)

Assembler

b)

Compiler

c)

Interpreter

106.

Which language translator is used for Low Level Languages?

a)

Assembler

b)

Compiler

c)

Interpreter

107.

Which language translator is used at the end of development?

a)

Assembler

b)

Compiler

c)

Interpreter

108.

Which language translator is used during the development of a program?

a)

Assembler

b)

Compiler

c)

Interpreter

109.

Which language translator produces Object Code and an Error Report?

a)

Assembler

b)

Compiler

c)

Interpreter

110.

Which language translator does not convert source code into machine code?

a)

Assembler

b)

Compiler

c)

Interpreter

111.

What is meant by source code?

a)

The final executable program

b)

The code written by the programmer

c)

The additional information about errors

d)

Code relating to sources of information on the Internet

112.

What generation of programming language is Machine Code

a)

1st Generation

b)

2nd Generation

c)

4th Generation

d)

3rd Generation

113.

What type of language translator is needed for the 1st Generation to the CPU

a)

Compiler

b)

No translator needed

c)

Assembler

d)

Interpreter

114.

Why would you program in a low level language.

a)

Easier to understand

b)

Uses less code

c)

Makes programs with small file sizes

d)

Simple to de-bug

115.

One advantage of programming in a high level language is.

a)

Eliminates bugs

b)

Easier to understand

c)

Executes faster than other levels

d)

Useful for programming device drivers

116.

Define the relationship between low and high level languages.

a)

One to One (One high level instruction = one low level)

b)

One to Two (Each high level instruction has two low level instructions)

c)

One to Many (Each high level instruction has many low level instructions)

d)

Many to One (Many high level instruction has only one low level instruction)

117.

What is used to translate assembly code.

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Router

118.

What is NOT used when translating high level languages

a)

Assembler

b)

Compiler

c)

Router

d)

Interpreter

119.

What is used to translate the entire source code in one go.

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Router

120.

On fully developed code, what translator is used at the end before publishing.

a)

Assembler

b)

Compiler

c)

Interpreter

d)

Editor