wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Componet 2 GCSE Computer SCience - Eduqas

Total questions: 128

Worksheet time: 1hrs 7mins

Name
Class
Date
1.
Breaking a complex problem down into smaller problems and solving each one individually.
a)
Decomposition
b)
Abstraction
c)
Programming
d)
Algorithmic Thinking
2.
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
3.
A logical way of getting from the problem to the solution. If the steps you take to solve a problem follow an algorithm then they can be reused and adapted to solve similar problems in the future.
a)
Decomposition
b)
Abstraction
c)
Programming
d)
Algorithmic Thinking
4.
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
5.
What is abstraction?
a)
The process of filtering out unnecessary detail.
b)
The process of filtering out irrelevant characteristics
c)
The process of filtering out irrelevant characteristics and unnecessary detail.
6.

Define ABSTRACTION

a)

Breaking a task into smaller tasks.

b)

Drawing a map to show how to reach a destination.

c)

Creating step by step instructions.

d)

Focusing on what is important and ignoring what is unnecessary.

7.

Define DECOMPOSITION

a)

Breaking a task into smaller tasks.

b)

Looking for similarities and trends.

c)

A sequence of instructions.

d)

Focusing on what is important and ignoring what is unnecessary.

8.
Finding and fixing problems in your algorithm or program.
a)
Concentrating
b)
Debugging
c)
Repairing
d)
Concatentating
9.
A variable that is declared inside a function -- includes function parameter variables.
a)
Event Handler
b)
Expression
c)
Global Variable
d)
Local Variable
10.
What is the scope of a global variable?
a)
the entire program
b)
the procedure in which it is declared
c)
the entire world
d)
the range of values it can hold
11.

What two types of search Algorithms are there?b

a)

Binary and Von Neumann

b)

Data and Control

c)

Binary and Linear

d)

Linear and Bubble

12.

In a Binary search algorithm, which item do you need to find in an ordered list?

a)

First

b)

Middle

c)

Second

d)

Last

13.

What do you do after finding the middle item in a binary search?

a)

Compare it to the number you are looking for.

b)

Times it to the number you are looking for.

c)

Stare at it until it becomes the number you were looking for.

d)

Take it away to the number you are looking for.

14.

What is the difference between a linear search and a binary search?

a)

Linear searches are much less efficient and can be used for an un-ordered list.

b)

Binary searches take longer to do.

c)

One is when you look for lines, whereas one is where you look for numbers.

d)

Not a clue..

15.

What does a linear search do first?

a)

Find the last item.

b)

Find the middle item.

c)

Look at the first item

d)

Look at the second to last item.

16.

What does a bubble sort algorithm do first?

a)

Look at the last item.

b)

Look at the first and last items.

c)

Look at the first two items.

d)

Look at the middle two items.

17.
code executed based on a condition being true 
a)
sequence 
b)
selection
c)
iteration
d)
variable
18.
code repeated / looped until a condition has been met or a set number of times 
a)
sequence
b)
selection
c)
iteration / repetition 
d)
variable 
19.
count controlled loop - code executed a given number of times is called 
a)
while loop
b)
for loop
c)
repeat loop
d)
if - else loop
20.
a loop repeated if the condition is true / false 
a)
while loop
b)
for loop
c)
repeat loop
d)
if - else loop
21.
a location in memory used to store data that can be changed is called a 
a)
constant
b)
value
c)
variable
d)
iteration 
22.
to solve a problem that requires the user to enter 10 numbers would use what type of iteration? 
a)
while loop
b)
for loop
c)
variable
d)
selection
23.
the user is asked to enter a number which must be below 100. what type of iteration would be used to check this? 
a)
for loop
b)
while loop
c)
check loop
d)
repeat loop
24.
what statement is used to implement selection?
a)
FOR and WHILE
b)
IF ELSE and WHILE
c)
DO and WHILE
25.
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.
26.
What is a flowchart?
a)
A textual representation of algorithms.
b)
A graphical representation of algorithms.
c)
A cluster of different shapes.
d)
A program code written in Logo.
27.
What does this shape represent in flowchart?
a)
Start/Stop
b)
Decision
c)
Process
d)
Input/Output
28.

What is Pseudocode?

a)

Syntax code that is written in Plain English.

b)

Syntax code that is simplified into code that is easier to understand.

c)

Python code that is now syntax code

d)

Syntax code that is python code

29.

What does this symbol represent in a flowchart?

a)

Input or Output

b)

The Flow of Data

c)

A Start or End

d)

A Process

30.

What does this symbol represent in a flowchart?

a)

A Decision

b)

A Subprocess

c)

A Start or End

d)

The Flow of Data

31.

What does this symbol represent in a flowchart?

a)

A Process

b)

An Input/Ouput

c)

A Decision

d)

A Start or End

32.
What is the Output if the user enters:
Yes
a)
Leave umbrella at home
b)
Take an umbrella
33.
What does this symbol mean?
<
a)
Greater Than
b)
Less Than
34.
What does this symbol mean?
>
a)
Greater Than
b)
Less Than
35.

The following is pseudocode for which algorithm?


Repeat, starting at the first element:

If the first element is what you’re looking for (the target), stop.

Otherwise, move to the next element.

a)

linear

b)

binary

c)

bubble

d)

merge

36.

The following is pseudocode for which algorithm?


look at middle of array

if element you’re looking for

return true

else if element is to left

search left half of array

else if element is to right

search right half of array

else

return false

a)

linear

b)

binary

c)

bubble

d)

merge

37.
What is the function of the <p> tag?
a)
Defines a paragraph.
b)
Makes the text purple.
c)
It pushes the text to the right.
d)
Prints the webpage.
38.
What does HTML stand for?
a)
Hypertext Medium Language
b)
Hippo Tries Making Licorice
c)
Hypertext Markup Lingo
d)
Hypertext Markup Language
39.
What HTML element defines the title of the document?
a)
<title>
b)
<head>
c)
<meta>
40.
The content of the web (such as your pictures, text, links) will show up here. 
a)
Head
b)
Body
c)
Style
d)
Folder
41.
Which of the following is the largest heading? 
a)
H2
b)
H3
c)
H4
d)
H6
42.
Which tag is used to underline text?
a)
<a>
b)
<u>
c)
<b>
d)
<I>
43.
Which tag is used to create a hyperlink?
a)
<a>
b)
<href>
c)
<b>
d)
<i>
44.
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"/>
45.

Choose the correct HTML element for the largest heading:

a)

<h1>

b)

<heading>

c)

<head>

d)

<h6>

46.

Which character is used to indicate an end tag?

a)

/

b)

*

c)

<

d)

>

47.
You should save HTML files with which file extension?
a)
.htm
b)
.index
c)
.webpage
d)
.html
48.
<body>
a)
Body tag
b)
Paragraph tag
c)
Closing body tag
d)
Header tag
49.
</body>
a)
Body tag
b)
Paragraph tag
c)
Closing body tag
d)
Header tag
50.
Greenfoot is an example of what type of programming?
a)
Procedural
b)
Object-Orientated
c)
Functional
d)
Declarative
51.
Name for the characters that live in the Greenfoot world's
a)
Actors
b)
Sprites
c)
Characters
d)
People
52.
To make an actor move just once you can click this button
a)
Run
b)
Act
c)
Play
d)
Move
53.
After you make changes to your world it will need to be .............. before working?
a)
Edited
b)
Changed
c)
Compiled
d)
Interpreted
54.
Which of these codes would allow an actor to move?
a)
move (4) ;
b)
move (4)
c)
move ();
d)
move ()
55.
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")
56.
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
57.

Integers (whole numbers) will be added to code in which type of brackets?

a)

{ }

b)

[ ]

c)

( )

58.
! =  means what?
a)
Equal to
b)
Not equal to
c)
Greater than
d)
Less than or equal to
59.
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
60.
Which part means the method can be accessd by other objects?
a)
public
b)
void
c)
act
d)
( )
61.
Which is the name of the method?
a)
public
b)
void
c)
act
d)
( )
62.
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
63.

Which command is in the Greenfoot library

a)

isTouching

b)

iskeyDown

c)

removeTouching

d)

act

64.

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

a)

Greenfoot.

b)

greenfoot.

c)

greenfoot

d)

Greenfoot()

e)

greenfoot()

65.

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")

66.

What are variables given?

a)

identifiers

b)

words

c)

ideas

d)

constants

67.

txt_FirstName. This is a variable name. WHat is it an example of?

a)

self-documenting identifier

b)

constant

c)

convention

d)

holder

68.

Advantges of self-documenting identifiers are

a)

Ease of use: Make source code easier to read and understand

b)

Maintainability: in future the code will be easy to maintain changes can be made as we know what variables/methods to make changes to.

c)

Quicker to code: the coder can quickly think of any variable name to use

69.

Advantges of self-documenting identifiers are

a)

Maintenance: It is easier to debug errors if it is clear what each identifier is/contains. (and possibly improve reusability)

b)

Documentation: Reduces the need for extra documentation or to refer to documentation whilst writing code. (Accept can generate documentation from code)

c)

Constant: the identifier names are representing constants and therefore they will be consistent

70.

_____ are used in computer programming to store data that does not change.

a)

constants

b)

names

c)

variables

d)

identifiers

71.

Constants are given self-documenting _______ that should reflect the data being stored in them

a)

identifiers

b)

tags

c)

names

d)

handles

72.

•An example of a constant would be

a)

name

b)

age

c)

pi

d)

cost

73.

A ____ variable is a variable that is defined within a sub procedure and as such is only accessible from within that same sub procedure

a)

local

b)

global

c)

static

d)

dynamic

74.

A ____ variable is a variable that has a larger scope as it is defined globally and is therefore accessible from anywhere within a program

a)

local

b)

global

c)

static

d)

dynamic

75.

An advantage of defining a ____ variable is that it is easier to track the changes to a variable and the reason for the changes when it is only used within a sub procedure

a)

local

b)

global

c)

static

d)

dynamic

76.

An advantage of defining a ____ variable is that sometimes it can be the most efficient way of ensuring that an important piece of data is accessible to all sub procedures, e.g. the details of the user currently logged into a program

a)

local

b)

global

c)

static

d)

dynamic

77.

What type of variable is declared on line 5?

a)

local

b)

global

78.

What type of variable is declared on line 8?

a)

local

b)

global

79.

Each time a program is run, ____ variables are stored in a location in memory and have a lifespan that lasts the entire time that program is running

a)

local

b)

global

c)

static

d)

dynamic

80.

Each time a ____ variable is defined, it is assigned a new location in memory and has a lifespan that ends when the sub procedure in which it was defined ends.

a)

local

b)

global

c)

static

d)

dynamic

81.

a good algorithm should be ______ – if an algorithm never ends trying to solve the problem then it is not going to be of use.

a)

finite

b)

infinite

c)

structured

d)

decomposed

82.

A good ______ should have well defined instructions – each step of the _______ should be clear so that it can be carried out exactly as intended.

a)

algorithm

b)

instruction

c)

program

d)

loop

83.

A good algorithm should be _______ – the algorithm should give the correct result/solution to the problem.

a)

effective

b)

constant

c)

finte

d)

looping

84.

Algorithms consist of a series of instructions in a specific order. This is the order or _______ in which the instructions must be carried out for the algorithm to work

a)

sequence

b)

selection

c)

iteration/repetition

85.

A _____instruction is one where a decision must be made. There are times when an instruction in an algorithm may give different options

a)

sequence

b)

selection

c)

iteration/repetition

86.

What is this an example of?

a)

sequence

b)

selection

c)

iteration/repetition

87.

Algorithms consist of a series of instructions in a specific order. This is the order or _________ in which the instructions must be carried out for the algorithm to work

a)

sequence

b)

selection

c)

iteration/repetition

88.

What is this an example of?

a)

sequence

b)

selection

c)

iteration/repetition

89.

What is this an example of?

a)

sequence

b)

selection

c)

iteration/repetition

90.

What is this an example of?

a)

sequence

b)

selection

c)

iteration/repetition

91.

Eventually all loops must be terminated. What cn be used to terminate a program?

a)

Rogue value

b)

a count

c)

sequencing instrctions

d)

machine code

92.

Count will record the number of times a process is carried out. When the count reaches the required number the _____ will terminate

a)

loop

b)

sub routine

c)

function

d)

instructions

93.

How doe sthi scode terminate?

a)

using a rogue value which is 10

b)

using a variable called count - when this variable equals 10

c)

using a variable called count - when this variable is less than 10

d)

using recursion

94.

A ______ is a value that falls outside the range of possible values for the data that is being processed

a)

rogue value

b)

count

c)

variable

d)

constant

95.

If we were calculating the average age of a class of children, we could set a ________ of -1 to stop the loop as no child can have a negative age.

a)

rogue value

b)

count

c)

variable

d)

constant

96.

How does thsi algorithm terminate the loop?

a)

using a rogue value -1 (when the user enters -1 the loop will terminate)

b)

using a selection statement inside the loop (IF statement)

c)

sequencing through variables

d)

using a count to total up the amount of times the code has iterated

97.

The process of combining a string with text or combining two strings with or without additional text is called what?

a)

concatenation

b)

string join

c)

combining

98.

what does the following pseudo code mean? len(name)

a)

find the length of the variable called name

b)

defining a variable called name

c)

define the length of the variable name

99.

Which sorting method uses - divide and conquer?

a)

merge sort

b)

bubble sort

c)

quick sort

100.

A _________first divides a list into two equal halves and then combines them in a sorted list. An unsorted list is divided into n sublists, each containing 1 element.The sublists are repeatedly merged to produce new sorted sublists until there is only 1 sorted sublist remaining.

a)

merge sort

b)

bubble sort

c)

linear search

d)

binary search

101.

choose the correct option

a)

merge sort

b)

bubble sort

c)

linear search

d)

binary search

102.

This algorithm is based on the comparison of adjacent data items, swapping them if they are not in the correct order

a)

merge sort

b)

bubble sort

c)

linear search

d)

binary search

103.

The ________ is not suitable for large sets of data. The algorithm that repeatedly steps through the list to be sorted. The algorithm compares each pair of adjacent items and swaps them if they are in the wrong order. The passes through the list are repeated until no swaps are needed

a)

merge sort

b)

bubble sort

c)

linear search

d)

binary search

104.

What is shown here?

a)

merge sort

b)

bubble sort

c)

linear search

d)

binary search

105.

The middle value in a list is inspected to see if it matches the search value. If the middle value is greater than the search value, the upper half of the list is discarded. If it is less than the search value, the lower half is discarded. This process is repeated, with the list halving in size each time until the search value is found.

a)

merge sort

b)

bubble sort

c)

linear search

d)

binary search

106.

If the list to be searched is not sorted, it is not possible to do a binary search. A _______ may be carried out instead. Items are examined in the sequence

a)

linear search

b)

bubble sort

c)

binary sort

d)

quick search

107.

Items are examined (checked) in the sequence

a)

merge sort

b)

bubble sort

c)

linear search

d)

binary search

108.

_______ is a programming language that is once removed from machine code. Machine code is made up of 0s and 1s and is extremely difficult for a programmer to use.

a)

Assembly language

b)

Machine language

c)

A high level language

d)

A low level language

109.

_______ programs:

•Require less memory and execution time

•Allow code to interact directly with hardware, such as device drivers

•Suitable for time-critical processes.

a)

Assembly language

b)

Machine language

c)

A high level language

d)

A low level language

110.

What is the assemlby language mneumonic for INPUT?

a)

INP

b)

OUT

c)

STA

d)

LDA

111.

What is the assemlby language mneumonic for OUTPUT?

a)

INP

b)

OUT

c)

STA

d)

LDA

112.

What is the assemlby language mneumonic for STORE?

a)

INP

b)

OUT

c)

STA

d)

LDA

113.

What is the assemlby language mneumonic for LOAD?

a)

INP

b)

OUT

c)

STA

d)

LDA

114.

What is the assemlby language mneumonic for ADD?

a)

INP

b)

DAT

c)

STA

d)

ADD

115.

What is the assemlby language mneumonic for SUBTRACT?

a)

SUB

b)

DAT

c)

STA

d)

INP

116.

What is the assemlby language mneumonic for BRANCH(USE TO LOOP)?

a)

BRA

b)

DAT

c)

LDA

d)

INP

117.

What is the assemlby language mneumonic for END/STOP/HALT?

a)

HLT

b)

DAT

c)

LDA

d)

INP

118.

What is the assemlby language mneumonic for DATA DEFINITION (DEFINING VARIBLES)?

a)

HLT

b)

DAT

c)

LDA

d)

INP

119.

What is this?


INP

STA 99

INP

ADD 99

OUT

HLT

a)

assembly language to add two numbers together

b)

assembly language that stops a program

c)

assembly language counting variables

d)

assembly languag counting more than two numbers

120.

what is the HTML tags for an anchor? (hyperlink)

a)

<a href=”URL”> </a>

b)

<a> </a>

c)

<body> </body>

d)

<img src = “image file name”>

121.

what is the HTML tags for an unordered list?

a)

<ul> </ul>

b)

<a> </a>

c)

<li> </li>

d)

<img src = “image file name”>

122.

what is the HTML tags for list item (bullet points)?

a)

<ul> </ul>

b)

<a> </a>

c)

<li> </li>

d)

<hr>

123.

what is the HTML tags for blockquote

a)

<ul> </ul>

b)

<b> </b>

c)

<blockquote> </blockquote>

d)

<hr>

124.

what is the HTML tags for a horizontal rule?

a)

<ul> </ul>

b)

<b> </b>

c)

<blockquote> </blockquote>

d)

<hr>

125.

what is the HTML tags for an image?

a)

<ul> </ul>

b)

<i> </i>

c)

<img> </img>

d)

<img src = “image file name”>

126.

In Object orientated Programming (OOP - Greenfoot) what has states and behaviours

a)

an object

b)

a class

c)

a method

127.

In Object orientated Programming (OOP - Greenfoot) what is used to describe one or more objects. It is a plan or template for creating objects within a program. Each object is created from a single one of these but it can be used to create many objects

a)

an object

b)

a class

c)

a method

128.

In Object orientated Programming (OOP - Greenfoot) what is a behaviour? One class can contain many of these such as on object moving. The names of these must always begin with a lowercase letter.

a)

an object

b)

a class

c)

a method