wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

WJEC GCSE Computer Science Unit 2 Revision

Total questions: 135

Worksheet time: 1hrs 12mins

Name
Class
Date
1.

What is computational thinking?

a)

Thinking like a computer.

b)

Techniques used to solve complex problems.

c)

Computer programming

2.

What is a complex problem?

a)

A problem that is not easy to solve or understand at first.

b)

A problem that you can solve straight away.

c)

A problem that is too hard so you should try to solve it.

3.

Which of these are pillars of computational thinking?

a)

Decomposition: Breaking down data, processes, or problems into smaller, manageable parts

b)

Pattern Recognition: Observing patterns, trends, and regularities in data

c)

Abstraction: Identifying the most important details and discarding the unimportant aspects to make the solution manageable

d)

Algorithm Design: Developing the step by step instructions for solving this and similar problems

e)

functional programming - treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data

4.
Breaking a complex problem down into smaller problems and solving each one individually.
a)
Decomposition
b)
Abstraction
c)
Programming
d)
Algorithmic Thinking
5.
Picking out the important bits of information from the problem, ignoring the specific details that don't matter.
a)
Decomposition
b)
Abstraction
c)
Programming
d)
Algorithmic Thinking
6.

A logical way of getting from the problem to the solution.

a)

Decomposition

b)

Abstraction

c)

Programming

d)

Algorithmic Thinking

7.
Which of these would not be involved in decomposing a problem?
a)
Thinking about how the problem could be divided into smaller parts
b)
Working out who could help you solve a part of the problem
c)
Adding more parts to the problem so it becomes more complaex
8.
Which of these is an example of decomposition?
a)
Breaking the problem of organising a cake sale into smaller parts, such as who will bake the cakes and when to hold the cake sale.
b)
Taking the problem of baking a cake and thinking about how we can make it the best cake possible.
c)
Looking at what different kinds of cake can be made.
9.
When is a computer most likely to be used when using computational thinking?
a)
During decomposition
b)
At the end, when programming a computer
c)
When writing algorithms
10.

Why are these icons a good use of abstraction?

a)

They tell us what they mean without needing to use the name

b)

They are difficult to understand

c)

They don't explain what they are

11.

Which of these algorithms will complete this maze?

a)

Turn Left, Forward 1 space, Turn Right, Forward 6 spaces, Turn Right, Forward 3 Spaces, Turn Left, Forward 1 space

b)

Turn Left, Forward 3 Spaces, Turn Right, Forward 1 Space, Turn Left, Forward 1 space, Turn Right, Forward 3 Spaces

c)

Turn Right, Forward 2 Spaces, Turn Left, Forward 7 Spaces

12.

Which of these is NOT a method of computational thinking?

a)

Abstraction

b)

Decomposition

c)

Coding

d)

Pattern Recognition

13.

Which of the following contains a pattern?

a)

All houses have a front door

b)

My house has a garden

c)

My friend's house has a garden

d)

Some houses have a chimney

14.
What is the correct definition of an algorithm?
a)
An algorithm is a step by step instructions to solve a problem.
b)
An algorithm is a process of baking bread.
c)
An algorithm is a software used to compute numbers.
d)
An algorithm is the process of breaking problems.
15.
What command is this shape for?
a)
START / STOP
b)
INPUT / OUTPUT
c)
PROCESS
d)
DECISION
16.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
17.
What does this shape represent?
a)
Decission
b)
Process
c)
Input/Output
d)
Start/End
18.
What command is this shape for?
a)
References another part of the program
b)
Data that is going in as input or coming out as output
c)
Processing something - a calculation or storing something into a variable
d)
Shows the direction of the program
19.
What will be displayed as output?
a)
10
b)
20
c)
30
d)
40
20.
What is pseudocode?
a)
Simplified programming language, that is not a specific language
b)
Complicated programming language
c)
Simple programming language, which is linked to a specific language
d)
A type of cheese
21.
What is this symbol?
a)
Decision
b)
Input/Output
c)
Start/End
d)
Process
22.
What is decomposition?
a)
Breaking down of soil
b)
Breaking down of a problem into smaller chunks
c)
Making a problem a bigger deal 
d)
Breaking smaller chunks of problems into one large problem
23.
Abstraction is.....
a)
The process of drawing abstract pictures.
b)
The process of assigning values to variables.
c)
The process of breaking down problems.
d)
The process of removing unnecessary details from a problem.
24.

How many arrows should come out of a decision symbol in a flowchart?

a)

0

b)

1

c)

2

d)

3

25.
When you write an algorithm the order of the instructions is very important.
a)
True
b)
False
26.

What is a sequence

a)

Putting and executing instructions in order.

b)

A pattern of numbers.

c)

Instructions which a computer follows.

d)

A line of code

27.

What are the three algorithm constructs?

a)

Sequence, Selection, Iteration

b)

Input, Process, Output

c)

Input/output, decision, terminator

d)

Loop, input/output, process

28.

Which of the following Pseudocode statements is the correct way of assigning the number 5 to the variable Cost?

a)

Input Cost

b)

Cost = "5"

c)

Cost = 5

d)

Set Cost = 5

29.

Which of the following Pseudocode statements is the correct way of declaring the variable Cost?

a)

Dim Cost as Integer

b)

Cost as Integer

c)

Define Cost as Integer

d)

Declare Cost as Integer

30.

Which of the following Pseudocode statements is the correct way of taking the input from the user,10.99, and assigning it to the variable Cost?

a)

Input "Cost"

b)

Enter Cost

c)

Input 10.99

d)

Input Cost

31.

What is the correct data type for a variable called "Average"?

a)

Boolean

b)

String

c)

Character

d)

Integer

e)

Real

32.

What is the correct data type for a variable called "NoOfReadings"?

a)

Boolean

b)

String

c)

Character

d)

Integer

e)

Real

33.

Which of the following Pseudocode statements is the correct way of starting a For loop that will loop 10 times?

a)

For i = 2 to 10

b)

For Until i =10

c)

For i = 0 to 9

d)

For i = 10

34.
What is the correct definition of an algorithm?
a)
An algorithm is a step by step instructions to solve a problem.
b)
An algorithm is a process of baking bread.
c)
An algorithm is a software used to compute numbers.
d)
An algorithm is the process of breaking problems.
35.
What is the difference between a flowchart and pseudocode? 
a)
A flowchart is diagramatic whilst pseudocode is written in a programming language (eg. Pascal or Java) 
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 
36.
What command is this shape for?
a)
START / STOP
b)
INPUT / OUTPUT
c)
PROCESS
d)
DECISION
37.
What does this shape represent?
a)
Input/Output
b)
Decision
c)
Process
d)
Start/Stop
38.
What does this shape represent?
a)
Decission
b)
Process
c)
Input/Output
d)
Start/End
39.
What's missing ?
a)
On/Off
b)
Pink/Blue
c)
Hello/Goodbye
d)
Yes/No
40.
What command is this shape for?
a)
References another part of the program
b)
Data that is going in as input or coming out as output
c)
Processing something - a calculation or storing something into a variable
d)
Shows the direction of the program
41.
What will be displayed as output?
a)
10
b)
20
c)
30
d)
40
42.
What is the Output if the user enters:
Yes
a)
Leave umbrella at home
b)
Take an umbrella
43.
Which of the following assignment statements is assigning text.
a)
myName = "David"
b)
myAge = 21
44.
What is this symbol?
a)
Decision
b)
Input/Output
c)
Start/End
d)
Process
45.

How many arrows should come out of a decision symbol in a flowchart?

a)

0

b)

1

c)

2

d)

3

46.

The following algorithm should take as input and add together two numbers, outputting the result.


Identify the correct algorithm.

a)
b)
c)
d)
47.

The following algorithm should take as input on number, and output the 12 times table for that number.


Identify the correct algorithm.

a)
b)
c)
d)
48.

The following algorithm should take as input two numbers, add them together, multiply the answer by 11, add 4, then divide by 2. It should output the result.


Identify the correct algorithm.

a)
b)
c)
d)
49.
When you write an algorithm the order of the instructions is very important.
a)
True
b)
False
50.

What are the three algorithm constructs?

a)

Sequence, Selection, Iteration

b)

Input, Process, Output

c)

Input/output, decision, terminator

d)

Loop, input/output, process

51.
Identify the description of a binary search
a)
Put the elements in order, check each item in turn
b)
Put the elements in order, compare to the middle value, split the list in order and repeat
c)
Elements do not need to be in order, check each item in turn
d)
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
52.
Identify the description of a linear search
a)
Put the elements in order, check each item in turn
b)
Put the elements in order, compare to the middle value, split the list in order and repeat
c)
Elements do not need to be in order, check each item in turn
d)
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
53.

A linear search is to be performed on the list above.

How many comparisons would it take to find the number 1?

a)

1

b)

2

c)

3

d)

4

54.

A binary search is to be performed on the list above.

How many comparisons would it take to find the number 9?

a)

0-1

b)

2-3

c)

4-5

d)

It can't find the number 9

55.

A binary search is to be performed on the list above.

How many comparisons would it take to the find the number 101?

a)

0-1

b)

1-2

c)

3-4

d)

4-5

56.
Which sorting algorithm is described by: moving through a list repeatedly, swapping elements that are in the wrong order.
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
57.
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.
a)
Merge
b)
Bubble
c)
Insertion
d)
None of the above
58.

The above list is to be sorted using a bubble sort.

What will the list look like after the first iteration through the list.

a)
b)
c)
d)
59.

The two lists above are to be merged, which element first goes into the new merged list

a)

0

b)

1

c)

2

d)

3

60.
On average, which searching algorithm is more efficient?
a)
Binary Search
b)
Linear Search
61.
Which of the following is the best description of the linear search algorithm?
a)
Put the elements in order, then go through them one by one until target is found or the end of the list is reached.
b)
Put the elements in order, compare with the middle value, if not the target: continue to the left or right of the middle and repeat. 
c)
Elements do not need to be in order. Go through them one by one until target is found or the end of the list is reached.
d)
Elements do not need to be in order, compare with the middle value, if not the target: continue to the left or right of the middle and repeat. 
62.
As the data set grows in size, linear search becomes more efficient than binary search. 
a)
True
b)
False
63.
What is the maximum number of comparisons a linear search algorithm could make while searching a 100 item list?
a)
50
b)
51
c)
100
d)
101
64.
Which type of sort algorithm is this?
a)
Bubble
b)
Merge
c)
Insertion
65.
Which type of sort algorithm is this?
a)
Bubble
b)
Merge
c)
Insertion
66.
A binary search algorithm will only work on a list which is in order. True or False
a)
True
b)
False
67.
Which one of the following is an advantage of a linear search?
a)
It takes a long time to find the item.
b)
It is a simple algorithm to write.
c)
It is more efficient than a binary search.
d)
It is a complex algorithm to write.
68.
Which type of sort algorithm is this?
a)
Insertion
b)
Merge
c)
Bubble
69.
Which type of search algorithm is this?
a)
Binary
b)
Linear
70.
Which type of search algorithm is this?
a)
Binary
b)
Linear
71.
What is the biggest disadvantage of a binary search?
a)
It is slow
b)
It can only be used if the data is sorted into an order
c)
It takes the data and keeps dividing it in half until it finds the item it is looking for
72.
Using a binary search why will the number 9 never be found in the following list:
11, 8, 13, 9, 7, 3
a)
It does not work on numbers
b)
It only works on letters
c)
The list is not in order
73.

Which algorithm uses a divide and conquer approach?

a)

Linear Search

b)

Binary Search

74.
What is an advantage of the Linear search algorithm?
a)
Performs well with small sized data sets
b)
Can be used on data sets with more than a million elements
c)
Is complicated to code
75.
What does HTML stand for?
a)
Hypertext Making Language
b)
Hyper Transfer Markup Language
c)
Hypertext Markup Language
d)
Hyper Transfer Making Language
76.
HTML Language uses
a)
Tabs
b)
Tags
c)
Punctuation
d)
Quotations
77.
<h> is
a)
Header Tag
b)
Headline Tag
c)
Half of a tag
d)
Closing header tag
78.
</h> is
a)
Header Tag
b)
Headline Tag
c)
Half of a tag
d)
Closing header tag
79.
<p> is
a)
punctuation tag
b)
closing paragraph tag
c)
closing punctuation tag
d)
paragraph tag
80.
Body tags are used;
a)
Used for only the header
b)
Used only for the paragraph
c)
element that wraps everything that is visible on the page.
d)
Not used in HTML
81.
You should save HTML files with which file extension?
a)
.htm
b)
.index
c)
.webpage
d)
.html
82.
Which of the following is the largest heading? 
a)
H2
b)
H3
c)
H4
d)
H6
83.
The following tag will show a bulleted list
a)
<ul>
b)
<ol>
c)
<li>
d)
<list>
84.
Which tag is used to underline text?
a)
<a>
b)
<u>
c)
<b>
d)
<I>
85.

What is the correct syntax for inserting an image?

a)

<image source="untitled.jpg">

b)

<img src="untitled.jpg">

c)

<src img="untitled.jpg">

d)

<img scr="untitled.jpg">

86.

Which of these does not need a closing tag?

a)

<body>

b)

<hr>

c)

<title>

d)

<blockquote>

87.

Which would you use for making bullet point list?

a)

A

b)

B

c)

C

d)

D

88.

Which would you use for a numbered list?

a)

A

b)

B

c)

C

d)

D

89.

Which of these will make a working hyperlinnk

a)

<a href="www.google.com">Click Here</a>

b)

<a href="www.google.com"></a>Click Here

c)

<a href="www.google.com" Click Here>

d)

<a href="http://www.google.com">Click Here</a>

90.

T0 place text or an image in the midle of the screen which tag do you need to use?

a)

<centre>

b)

<center>

c)

<middle>

d)

<body>

91.

Which of these will correctly add a title to a web page

a)
b)
c)
d)
92.

Which of these will create a working hyperlink?

a)
b)
c)
d)
93.

Which is the proper way to write an h1 tag

a)

<h1>Hello</h1>

b)

<h1>"Hello

c)

{h1}Hello{/h1}

d)

<h1>Hello<h1>

94.

Which tag is used to mark the items in a list?

a)

<li>

b)

<br>

c)

<ul>

d)

<ol>

95.
An operation that an object can do. I.e. a bit of code that makes the object work.
a)
method
b)
class
c)
object
d)
program
96.
Which is the name of the method?
a)
public
b)
void
c)
act
d)
( )
97.
You have a Wombat on screen.  This method is called  whenever you do whatever the Wombat  wants to do. This method is called whenever 'Run' button gets pressed in the environment.
a)
act()
b)
move()
c)
setLocation()
98.
What is missing?
a)
;
b)
(
c)
{
99.
Classic error.  How do you fix it?
a)
Add a { at the end
b)
Add a } at the end
c)
Control+shift+i to re-order the indentation
d)
Move it all into the act method
100.
Anything in the white areas needs to end with
a)
)
b)
;
c)
}
101.

Methods start with a a capital

a)

True

b)

False

102.

Methods should be written in lower camel case

a)

True

b)

False

103.

Which one is lower camel case?

a)

destroyAsteroidOnce

b)

destroyAsteroidonce

c)

DestroyAsteroidonce

d)

destroyasteroidOnce

104.

Classes start without a capital

a)

False

b)

True

105.

Which operations are needed to remove an actor from the world? (In order)

a)

isTouching(), removeTouching()

b)

isTouching(), removeTouching();

c)

get.(actor)OffSet;

d)

addObject(actor object, int x, int y);

106.

Which code is required to allow interaction with the actor and user?

a)

If ( Greenfoot.isKeyDown());

b)

If ( Greenfoot.isKeyDown("right")); setDirection(90)

c)

If ( Greenfoot.isKeyDown("right")) { setDirection(0); }

d)

If ( Greenfoot.isKeyDown("right"));{ setDirection(0); }

107.

What is often programmed into the public voiced, 'act'?

a)

move();T

b)

move and turn();

c)

turn();

d)

move(); turn();

108.

Which code will make an actor move randomly?

a)

(Greenfoot.getRandomNumber(100) < 10);

b)

(Greenfoot.getRandomNumber(4){ setDirection(90*4)};

c)

(Greenfoot.getRandomNumber();

d)

(Greenfoot.getRandomNumber(4){ turn(Greenfoot.getRandomNumbe

109.

How are comments made within Java Greenfoot

a)

same as python, with #

b)

/

c)

*

d)

*//

110.

Which of the following is an acceptable file type for adding sounds in Greenfoot?

a)

.JPEG

b)

.htm

c)

.mp3

d)

.wav

111.
To make an actor move just once you can click this button
a)
Run
b)
Act
c)
Play
d)
Move
112.
After you make changes to your world it will need to be .............. before working?
a)
Edited
b)
Changed
c)
Compiled
d)
Interpreted
113.
Which of these codes would allow an actor to move?
a)
move (4) ;
b)
move (4)
c)
move ();
d)
move ()
114.
Which of these would allow an actor to move with the arrow keys?
a)
Greenfoot.isKeyDown("left")
b)
Greenfootiskeydown(left)
c)
Greenfoot.ISKEYDOWN("LEFT")
d)
greenfoot.isKeyDown("left")
115.
Once your scenario is filled up with coded actors, what option can help populate the world as you want in future?
a)
Saving the world
b)
Saving the code
c)
Saving the compiler
116.
! =  means what?
a)
Equal to
b)
Not equal to
c)
Greater than
d)
Less than or equal to
117.
An operation that an object can do. I.e. a bit of code that makes the object work.
a)
method
b)
class
c)
object
d)
program
118.

Which command is in the Greenfoot library

a)

isTouching

b)

iskeyDown

c)

removeTouching

d)

act

119.

How do you access commands that are in the Greenfoot library?

a)

Greenfoot.

b)

greenfoot.

c)

greenfoot

d)

Greenfoot()

e)

greenfoot()

120.

I want to play a sound called pop. What is the correct command?

a)

Greenfoot.play("pop.wav")

b)

play("pop.wav")

c)

playSound("pop.wav")

d)

Greenfoot.playSound("pop.wav")

e)

Greenfoot.sound("pop.wav")

121.

Every computer processor has the same instruction set

a)

True

b)

False

122.

What are the 2 parts of the instruction?

a)

Opinstruction and Opmemory

b)

Opcommand and Opstate

c)

Opcode and Operand

d)

Opcommand and Opmemory

123.
What is Assembly code?
a)
Another name for Pseudocode
b)
A programming language that uses mnemonic codes
c)
A program that joins pieces of code together
d)
Another name for machine code
124.

In Little Man Computer which assembly instruction loads a value from memory onto the accumulator?

a)

STA x

b)

LDA x

c)

ADD x

d)

SUB x

e)

INP

125.

In Little Man Computer which assembly instruction stores the value in the accumulator to a memory location?

a)

STA x

b)

LDA x

c)

ADD x

d)

SUB x

e)

INP

126.

What translates assembly code into machine code?

a)

compiler

b)

assembler

c)

linker

d)

loader

e)

interpreter

127.

Each assembly instruction usually has an address or data called an

a)

opcode

b)

operand

c)

mnemonic

d)

instruction set

128.
Different CPUs require different assemblers.
a)
True
b)
False
129.
What is machine code?
a)
Instructions in binary
b)
Instructions and data in binary
c)
Python code
d)
Mnemonics like LDA
130.
What does the store instruction need to go with it
a)
The data to be stored
b)
Nothing
c)
A second istruction
d)
The memory location to store the data in the accumulator
131.
Little Man wants to read an input from user. Hence, he needs to use .....
a)
INP
b)
OUT
c)
LDA
d)
DAT
132.
What does the following instruction do in LMC: 
A DAT 5
a)
Creates a memory location called B
b)
Creates a memory location labelled 5 which stores the letter A
c)
Create a memory location labelled A which stores the number 5
d)
Creates a memory location labelled C
133.

What Mnemonic is used by the LMC to stop the program

a)

HLT

b)

STO

c)

STP

d)

STA

134.

What Mnemonic is used for Addition by the LMC

a)

ADD

b)

ADS

c)

ODD

d)

IDD

135.

What Mnemonic is used to Subtract by the LMC

a)

SUB

b)

SBU

c)

SBB

d)

SUU