wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

AQA GCSE Algorithms

Total questions: 60

Worksheet time: 42mins

Name
Class
Date
1.

Sequence is when...

a)

...instructions are executed one after another

b)

instructions are executed one after another in a series

c)

instructions are executed by the user

d)

instructions are executed one after another but not always in series

2.

Selection is when...

a)

...a program will execute instructions regardless of what the user does

b)

...a program will execute certain instructions based on the user's actions

c)

...a program will execute certain instructions based on conditions

d)

....a program will execute all instructions regardless of what the user does

3.

Selection statements include...

a)

IF, THEN, ELSE & CASE

b)

IF, ELSE, & CASE

c)

IF, THAN, ELSE & CASE

d)

IF, THEN, ELSE, ELIF & CASE

4.

In computer programming 'iteration' is used to...

a)

... loop around and around a piece of code until the correct answer is chosen

b)

...loop around a piece of code until a condition is met that activates the next part of the program

c)

...loop around and around a piece of code until a condition is met that ends the iteration

d)

...loop twice around a piece of code until a condition is met that ends the iteration

5.

Logic errors in programs are...

a)

...errors in program statements that mean the outcome is unexpected, even though the program will run

b)

...errors in the algorithm that means the outcome is expected, even though the program will run

c)

...errors in the algorithm that means the outcome is unexpected, even though the program will run

d)

...errors in the algorithm that means the outcome returns nothing as the program will not run

6.

What is the main difference between a constant and a variable?

a)

A constant's value remains the same whereas a variable's value can change

b)

A constant's value only changes if a variable's value changes

c)

A constant's value remains the same whereas a variable's value can be changed by the user

d)

A constant's value remains the same whereas a variable's value can be changed, but only once

7.

A string is a data type that typically takes up 1 byte per character. Which of the following is a string?

a)

hello world

b)

"!£llo world4"

c)

"hello world

d)

hello world"

8.

Which of these is not a sorting algorithm?

a)

Bubble

b)

Insertion

c)

Merge

d)

Binary

9.

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 these

10.

Which sorting algorithm is described by: split a list into individual lists, then combine these, two lists at a time.

a)

Bubble

b)

Merge

c)

Insertion

d)

None of these

11.

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)

Bubble

b)

Insertion

c)

Merge

d)

None of these

12.

The following two lists are to be merged, which element first goes into the

new merged list?

List 1: 2 4 8 9

List 2: 1 6 8 4

a)

0

b)

1

c)

2

d)

3

13.

The following list is to be sorted using a bubble sort:

12, 6, 8, 1, 3


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

a)

6, 8, 1, 3, 12

b)

6, 12, 1, 8, 3

c)

1, 3, 6, 8, 12

d)

6, 8, 1, 12, 3

14.

Which sorting algorithm needs to go through the list repeatedly?

a)

Merge

b)

Bubble

c)

Insertion

d)

None of these

15.

Which sorting algorithm splits a list of items into individual lists?

a)

Merge

b)

Bubble

c)

Insertion

d)

None of these

16.
Which of these is a type of searching algorithm?
a)
Linear search
b)
Word search
c)
Search engine
17.
What does a linear search do?
a)
Looks at the first item of data, then each one in turn, until it finds the data item requested
b)
Organises the data into alphabetical order
c)
Splits the data until the requested data is found
18.
What is an advantage of a linear search?
a)
It is very quick
b)
It only works with ordered lists
c)
It is a simple algorithm
19.
What does a binary search do?
a)
Looks at the first item of data, then each one in turn, until it finds the data item requested
b)
Converts all the data into binary
c)
Takes the data and splits it in half repeatedly until it finds the data item requested
20.
Which search algorithm would be best to use with ordered data?
a)
A binary search
b)
Either binary search or a linear search
c)
A linear search
21.
What is an advantage of a binary search
a)
It's very quick
b)
It only works with ordered lists
c)
It is a simple algorithm
22.
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
23.
What does a bubble sort do?
a)
Sorts a list by comparing two items that are side by side, to see which is out of order
b)
Separates a list of data into different collections of data, before sorting and gathering back into a list
c)
Finds an item of data in a list
24.

How many passes will a bubble sort go through?

a)

Only one pass

b)

Two passes

c)

Several passes - until the data is fully ordered

25.
Why does a bubble sort do a final pass even when the data is in the correct order?
a)
To save the data
b)
It does not recognise that the data is in order until the final pass requires no changes
c)
It needs to do this to put the data back in to a list
26.
Which of the following is NOT an advantage of a bubble sort?
a)
It is a very small and simple computer program
b)
There is only one task to perform
c)
It is very quick
27.

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.

28.

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.

29.

What does this shape represent in flowchart?

a)

Start/Stop

b)

Decision

c)

Process

d)

Input/Output

30.

What is the correct symbol for an input in a flowchart?

a)

A diamon

b)

A square

c)

A parallelogram

d)

A rectangle

31.

The process carried out in computer systems is represented by _______________ in flowchart.

a)

Rectangle

b)

parallelogram

c)

Square

d)

Diamond

32.

What does this shape represent in flowchart?

a)

Input/Output

b)

Process

c)

Decision

d)

Start/Stop

33.

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

34.

Which type of sort algorithm is this?

a)

Bubble

b)

Merge

c)

Insertion

35.

Which type of sort algorithm is this?

a)

Bubble

b)

Merge

c)

Insertion

36.

If you have a large amount of data to search through the best algorithm would be a

a)

Binary Search

b)

Linear Search

37.

Which search algorithm is the easiest to understand?

a)

Binary

b)

Linear

38.

Which type of search algorithm is this?

a)

Binary

b)

Linear

39.

If the data is in order the best search to use would be a

a)

Binary Search

b)

Linear Search

40.

Which of these is NOT a search algorithm

a)

Binary

b)

Linear

c)

Bubble

41.
What will be displayed as output?
a)
10
b)
20
c)
30
d)
40
42.
Assume n1 = 10 ... n2 = 2 ... n3 = 2
What will be displayed as output?
a)
10
b)
20
c)
30
d)
40
43.
Assume n1 = 6 ... n2 = 4 ... n3 = 2
What will be displayed as output?
a)
3
b)
4
c)
5
d)
6
44.
Assume n1 = 10 ... n2 = 20
What will be displayed as output?
a)
10
b)
20
45.

What's missing ?

a)

On/Off

b)

Pink/Blue

c)

Hello/Goodbye

d)

Yes/No

46.
An instruction that determines the order / flow of a program is known as a...
a)
Selection Statement
b)
Looping Statement
c)
Variable Statement
d)
Abstract Statement
47.
Which sorting algorithm may make multiple swaps per pass?
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
48.
The following lists represent 3 passes of a sorting algorithm. Which algorithm is being used to sort the list?
 
4    5    9    6    2    7

4    5    6    2    7    9 
4    5    2    6    7    9
a)
Bubble Sort
b)
Selection Sort
c)
Insertion Sort
49.
We are sorting the following list in ascending order:
 
1    4    2    9    3    8    5
 
What does the list look like after one pass of the bubble sort algorithm. 
a)
1 2 4 3 8 5 9
b)
1 4 2 5 3 8 9
c)
4 2 9 3 8 5 1
50.
What is an Algorithm?
a)
A flowchart
b)
Step by step instruction used to solve a problem
c)
A decision
d)
A Pseudocode
51.

Which algorithm, will NOT take you from A to B

a)

UP 1

RIGHT 5

UP 2

b)

RIGHT 1

UP 3

RIGHT 4

c)

UP 2

RIGHT 5

UP 1

d)

LEFT 1

UP 3

RIGHT 5

52.
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
53.
Bubble sort takes the first two values of a list, and swaps them if wrong?
a)
True
b)
False
54.
What does this pseudocode do?
print "Hello"
a)
Nothing
b)
Prints the word "Hello" to the output
c)
hello is print in pseudocode
d)
The code won't work
55.
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
56.
What is the Output if the user enters:
Yes
a)
Leave umbrella at home
b)
Take an umbrella
57.
What does this symbol mean?
<
a)
Greater Than
b)
Less Than
58.
What is this ?
a)
Pseudocode
b)
Flow chart
c)
Syntax
59.
An identifier is the ‘name’ given to a variable. For example: 
distanceToSchool = 10
What is the value of the variable?
a)
10
b)
=
c)
distanceToSchool
60.

Which of the following assignment statements is assigning a string.

a)

myName = "David"

b)

myAge = 21