Font size
WorksheetsComponet 2 GCSE Computer SCience - Eduqas
Total questions: 128
Worksheet time: 1hrs 7mins
Define ABSTRACTION
Breaking a task into smaller tasks.
Drawing a map to show how to reach a destination.
Creating step by step instructions.
Focusing on what is important and ignoring what is unnecessary.
Define DECOMPOSITION
Breaking a task into smaller tasks.
Looking for similarities and trends.
A sequence of instructions.
Focusing on what is important and ignoring what is unnecessary.
What two types of search Algorithms are there?b
Binary and Von Neumann
Data and Control
Binary and Linear
Linear and Bubble
In a Binary search algorithm, which item do you need to find in an ordered list?
First
Middle
Second
Last
What do you do after finding the middle item in a binary search?
Compare it to the number you are looking for.
Times it to the number you are looking for.
Stare at it until it becomes the number you were looking for.
Take it away to the number you are looking for.
What is the difference between a linear search and a binary search?
Linear searches are much less efficient and can be used for an un-ordered list.
Binary searches take longer to do.
One is when you look for lines, whereas one is where you look for numbers.
Not a clue..
What does a linear search do first?
Find the last item.
Find the middle item.
Look at the first item
Look at the second to last item.
What does a bubble sort algorithm do first?
Look at the last item.
Look at the first and last items.
Look at the first two items.
Look at the middle two items.
What is Pseudocode?
Syntax code that is written in Plain English.
Syntax code that is simplified into code that is easier to understand.
Python code that is now syntax code
Syntax code that is python code
What does this symbol represent in a flowchart?
Input or Output
The Flow of Data
A Start or End
A Process
What does this symbol represent in a flowchart?
A Decision
A Subprocess
A Start or End
The Flow of Data
What does this symbol represent in a flowchart?
A Process
An Input/Ouput
A Decision
A Start or End
Yes
<
>
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.
linear
binary
bubble
merge
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
linear
binary
bubble
merge
Choose the correct HTML element for the largest heading:
<h1>
<heading>
<head>
<h6>
Which character is used to indicate an end tag?
/
*
<
>
Integers (whole numbers) will be added to code in which type of brackets?
{ }
[ ]
( )
Which command is in the Greenfoot library
isTouching
iskeyDown
removeTouching
act
How do tou 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")
What are variables given?
identifiers
words
ideas
constants
txt_FirstName. This is a variable name. WHat is it an example of?
self-documenting identifier
constant
convention
holder
Advantges of self-documenting identifiers are
Ease of use: Make source code easier to read and understand
Maintainability: in future the code will be easy to maintain changes can be made as we know what variables/methods to make changes to.
Quicker to code: the coder can quickly think of any variable name to use
Advantges of self-documenting identifiers are
Maintenance: It is easier to debug errors if it is clear what each identifier is/contains. (and possibly improve reusability)
Documentation: Reduces the need for extra documentation or to refer to documentation whilst writing code. (Accept can generate documentation from code)
Constant: the identifier names are representing constants and therefore they will be consistent
_____ are used in computer programming to store data that does not change.
constants
names
variables
identifiers
Constants are given self-documenting _______ that should reflect the data being stored in them
identifiers
tags
names
handles
•An example of a constant would be
name
age
pi
cost
A ____ variable is a variable that is defined within a sub procedure and as such is only accessible from within that same sub procedure
local
global
static
dynamic
A ____ variable is a variable that has a larger scope as it is defined globally and is therefore accessible from anywhere within a program
local
global
static
dynamic
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
local
global
static
dynamic
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
local
global
static
dynamic
What type of variable is declared on line 5?
local
global
What type of variable is declared on line 8?
local
global
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
local
global
static
dynamic
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.
local
global
static
dynamic
a good algorithm should be ______ – if an algorithm never ends trying to solve the problem then it is not going to be of use.
finite
infinite
structured
decomposed
A good ______ should have well defined instructions – each step of the _______ should be clear so that it can be carried out exactly as intended.
algorithm
instruction
program
loop
A good algorithm should be _______ – the algorithm should give the correct result/solution to the problem.
effective
constant
finte
looping
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
sequence
selection
iteration/repetition
A _____instruction is one where a decision must be made. There are times when an instruction in an algorithm may give different options
sequence
selection
iteration/repetition
What is this an example of?
sequence
selection
iteration/repetition
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
sequence
selection
iteration/repetition
What is this an example of?
sequence
selection
iteration/repetition
What is this an example of?
sequence
selection
iteration/repetition
What is this an example of?
sequence
selection
iteration/repetition
Eventually all loops must be terminated. What cn be used to terminate a program?
Rogue value
a count
sequencing instrctions
machine code
Count will record the number of times a process is carried out. When the count reaches the required number the _____ will terminate
loop
sub routine
function
instructions
How doe sthi scode terminate?
using a rogue value which is 10
using a variable called count - when this variable equals 10
using a variable called count - when this variable is less than 10
using recursion
A ______ is a value that falls outside the range of possible values for the data that is being processed
rogue value
count
variable
constant
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.
rogue value
count
variable
constant
How does thsi algorithm terminate the loop?
using a rogue value -1 (when the user enters -1 the loop will terminate)
using a selection statement inside the loop (IF statement)
sequencing through variables
using a count to total up the amount of times the code has iterated
The process of combining a string with text or combining two strings with or without additional text is called what?
concatenation
string join
combining
what does the following pseudo code mean? len(name)
find the length of the variable called name
defining a variable called name
define the length of the variable name
Which sorting method uses - divide and conquer?
merge sort
bubble sort
quick sort
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.
merge sort
bubble sort
linear search
binary search
choose the correct option
merge sort
bubble sort
linear search
binary search
This algorithm is based on the comparison of adjacent data items, swapping them if they are not in the correct order
merge sort
bubble sort
linear search
binary search
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
merge sort
bubble sort
linear search
binary search
What is shown here?
merge sort
bubble sort
linear search
binary search
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.
merge sort
bubble sort
linear search
binary search
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
linear search
bubble sort
binary sort
quick search
Items are examined (checked) in the sequence
merge sort
bubble sort
linear search
binary search
_______ 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.
Assembly language
Machine language
A high level language
A low level language
_______ programs:
•Require less memory and execution time
•Allow code to interact directly with hardware, such as device drivers
•Suitable for time-critical processes.
Assembly language
Machine language
A high level language
A low level language
What is the assemlby language mneumonic for INPUT?
INP
OUT
STA
LDA
What is the assemlby language mneumonic for OUTPUT?
INP
OUT
STA
LDA
What is the assemlby language mneumonic for STORE?
INP
OUT
STA
LDA
What is the assemlby language mneumonic for LOAD?
INP
OUT
STA
LDA
What is the assemlby language mneumonic for ADD?
INP
DAT
STA
ADD
What is the assemlby language mneumonic for SUBTRACT?
SUB
DAT
STA
INP
What is the assemlby language mneumonic for BRANCH(USE TO LOOP)?
BRA
DAT
LDA
INP
What is the assemlby language mneumonic for END/STOP/HALT?
HLT
DAT
LDA
INP
What is the assemlby language mneumonic for DATA DEFINITION (DEFINING VARIBLES)?
HLT
DAT
LDA
INP
What is this?
INP
STA 99
INP
ADD 99
OUT
HLT
assembly language to add two numbers together
assembly language that stops a program
assembly language counting variables
assembly languag counting more than two numbers
what is the HTML tags for an anchor? (hyperlink)
<a href=”URL”> </a>
<a> </a>
<body> </body>
<img src = “image file name”>
what is the HTML tags for an unordered list?
<ul> </ul>
<a> </a>
<li> </li>
<img src = “image file name”>
what is the HTML tags for list item (bullet points)?
<ul> </ul>
<a> </a>
<li> </li>
<hr>
what is the HTML tags for blockquote
<ul> </ul>
<b> </b>
<blockquote> </blockquote>
<hr>
what is the HTML tags for a horizontal rule?
<ul> </ul>
<b> </b>
<blockquote> </blockquote>
<hr>
what is the HTML tags for an image?
<ul> </ul>
<i> </i>
<img> </img>
<img src = “image file name”>
In Object orientated Programming (OOP - Greenfoot) what has states and behaviours
an object
a class
a method
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
an object
a class
a method
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.
an object
a class
a method
