Font size
WorksheetsWJEC GCSE Computer Science Unit 2 Revision
Total questions: 135
Worksheet time: 1hrs 12mins
What is computational thinking?
Thinking like a computer.
Techniques used to solve complex problems.
Computer programming
What is a complex problem?
A problem that is not easy to solve or understand at first.
A problem that you can solve straight away.
A problem that is too hard so you should try to solve it.
Which of these are pillars of computational thinking?
Decomposition: Breaking down data, processes, or problems into smaller, manageable parts
Pattern Recognition: Observing patterns, trends, and regularities in data
Abstraction: Identifying the most important details and discarding the unimportant aspects to make the solution manageable
Algorithm Design: Developing the step by step instructions for solving this and similar problems
functional programming - treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data
A logical way of getting from the problem to the solution.
Decomposition
Abstraction
Programming
Algorithmic Thinking
Why are these icons a good use of abstraction?
They tell us what they mean without needing to use the name
They are difficult to understand
They don't explain what they are
Which of these algorithms will complete this maze?
Turn Left, Forward 1 space, Turn Right, Forward 6 spaces, Turn Right, Forward 3 Spaces, Turn Left, Forward 1 space
Turn Left, Forward 3 Spaces, Turn Right, Forward 1 Space, Turn Left, Forward 1 space, Turn Right, Forward 3 Spaces
Turn Right, Forward 2 Spaces, Turn Left, Forward 7 Spaces
Which of these is NOT a method of computational thinking?
Abstraction
Decomposition
Coding
Pattern Recognition
Which of the following contains a pattern?
All houses have a front door
My house has a garden
My friend's house has a garden
Some houses have a chimney
How many arrows should come out of a decision symbol in a flowchart?
0
1
2
3
What is a sequence
Putting and executing instructions in order.
A pattern of numbers.
Instructions which a computer follows.
A line of code
What are the three algorithm constructs?
Sequence, Selection, Iteration
Input, Process, Output
Input/output, decision, terminator
Loop, input/output, process
Which of the following Pseudocode statements is the correct way of assigning the number 5 to the variable Cost?
Input Cost
Cost = "5"
Cost = 5
Set Cost = 5
Which of the following Pseudocode statements is the correct way of declaring the variable Cost?
Dim Cost as Integer
Cost as Integer
Define Cost as Integer
Declare Cost as Integer
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?
Input "Cost"
Enter Cost
Input 10.99
Input Cost
What is the correct data type for a variable called "Average"?
Boolean
String
Character
Integer
Real
What is the correct data type for a variable called "NoOfReadings"?
Boolean
String
Character
Integer
Real
Which of the following Pseudocode statements is the correct way of starting a For loop that will loop 10 times?
For i = 2 to 10
For Until i =10
For i = 0 to 9
For i = 10
Yes
How many arrows should come out of a decision symbol in a flowchart?
0
1
2
3
The following algorithm should take as input and add together two numbers, outputting the result.
Identify the correct algorithm.
The following algorithm should take as input on number, and output the 12 times table for that number.
Identify the correct algorithm.
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.
What are the three algorithm constructs?
Sequence, Selection, Iteration
Input, Process, Output
Input/output, decision, terminator
Loop, input/output, process
A linear search is to be performed on the list above.
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 above.
How many comparisons would it take to find the number 9?
0-1
2-3
4-5
It can't find the number 9
A binary search is to be performed on the list above.
How many comparisons would it take to the find the number 101?
0-1
1-2
3-4
4-5
The above list is to be sorted using a bubble sort.
What will the list look like after the first iteration through the list.
The two lists above are to be merged, which element first goes into the new merged list
0
1
2
3
11, 8, 13, 9, 7, 3
Which algorithm uses a divide and conquer approach?
Linear Search
Binary Search
What is the correct syntax for inserting an image?
<image source="untitled.jpg">
<img src="untitled.jpg">
<src img="untitled.jpg">
<img scr="untitled.jpg">
Which of these does not need a closing tag?
<body>
<hr>
<title>
<blockquote>
Which would you use for making bullet point list?
A
B
C
D
Which would you use for a numbered list?
A
B
C
D
Which of these will make a working hyperlinnk
<a href="www.google.com">Click Here</a>
<a href="www.google.com"></a>Click Here
<a href="www.google.com" Click Here>
<a href="http://www.google.com">Click Here</a>
T0 place text or an image in the midle of the screen which tag do you need to use?
<centre>
<center>
<middle>
<body>
Which of these will correctly add a title to a web page
Which of these will create a working hyperlink?
Which is the proper way to write an h1 tag
<h1>Hello</h1>
<h1>"Hello
{h1}Hello{/h1}
<h1>Hello<h1>
Which tag is used to mark the items in a list?
<li>
<br>
<ul>
<ol>
Methods start with a a capital
True
False
Methods should be written in lower camel case
True
False
Which one is lower camel case?
destroyAsteroidOnce
destroyAsteroidonce
DestroyAsteroidonce
destroyasteroidOnce
Classes start without a capital
False
True
Which operations are needed to remove an actor from the world? (In order)
isTouching(), removeTouching()
isTouching(), removeTouching();
get.(actor)OffSet;
addObject(actor object, int x, int y);
Which code is required to allow interaction with the actor and user?
If ( Greenfoot.isKeyDown());
If ( Greenfoot.isKeyDown("right")); setDirection(90)
If ( Greenfoot.isKeyDown("right")) { setDirection(0); }
If ( Greenfoot.isKeyDown("right"));{ setDirection(0); }
What is often programmed into the public voiced, 'act'?
move();T
move and turn();
turn();
move(); turn();
Which code will make an actor move randomly?
(Greenfoot.getRandomNumber(100) < 10);
(Greenfoot.getRandomNumber(4){ setDirection(90*4)};
(Greenfoot.getRandomNumber();
(Greenfoot.getRandomNumber(4){ turn(Greenfoot.getRandomNumbe
How are comments made within Java Greenfoot
same as python, with #
/
*
*//
Which of the following is an acceptable file type for adding sounds in Greenfoot?
.JPEG
.htm
.mp3
.wav
Which command is in the Greenfoot library
isTouching
iskeyDown
removeTouching
act
How do you access commands that are in the Greenfoot library?
Greenfoot.
greenfoot.
greenfoot
Greenfoot()
greenfoot()
I want to play a sound called pop. What is the correct command?
Greenfoot.play("pop.wav")
play("pop.wav")
playSound("pop.wav")
Greenfoot.playSound("pop.wav")
Greenfoot.sound("pop.wav")
Every computer processor has the same instruction set
True
False
What are the 2 parts of the instruction?
Opinstruction and Opmemory
Opcommand and Opstate
Opcode and Operand
Opcommand and Opmemory
In Little Man Computer which assembly instruction loads a value from memory onto the accumulator?
STA x
LDA x
ADD x
SUB x
INP
In Little Man Computer which assembly instruction stores the value in the accumulator to a memory location?
STA x
LDA x
ADD x
SUB x
INP
What translates assembly code into machine code?
compiler
assembler
linker
loader
interpreter
Each assembly instruction usually has an address or data called an
opcode
operand
mnemonic
instruction set
A DAT 5
What Mnemonic is used by the LMC to stop the program
HLT
STO
STP
STA
What Mnemonic is used for Addition by the LMC
ADD
ADS
ODD
IDD
What Mnemonic is used to Subtract by the LMC
SUB
SBU
SBB
SUU
