WorksheetsGCSE (9–1) CS 2.1 Algorithms
Total questions: 30
Worksheet time: 9mins
Which is the correct definition for ‘algorithm’?
A problem
A solution to a problem
A set of instructions describing the steps taken to solve a problem
The words to enter when writing program code
Which of the following is not a component of computational thinking
Abstraction
Decomposition
Algorithms
Pseudocode
Identify the purpose of the following flowchart symbol.
Input
Output
Start/Stop
Decision
Identify the purpose of the following flowchart symbol.
Input/Output
Sub Program
Process
Decision
Identify the purpose of the following flowchart symbol.
Process
Decision
Sub Program
Start/Stop
Identify the purpose of the following flowchart symbol.
Decision
Start/Stop
Process
Input/Output
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.
num1 = int(input(“Enter the first number”))
num2 – int(input(“Enter the second number”))
num3 = num1 + num2
print(num3)
num1 = int(input(“Enter the first number”))
num2 = int(input(“Enter the second number”))
num2 = num1 + num2
print(num2)
num1 = int(input(“Enter the first number”))
num2 = int(input(“Enter the second number”))
num3 = num1 + num2
print(num3)
num1 = input(“Enter the first number”)
num2 = input(“Enter the second number”)
num3 = num1 + num2
print(num3)
The following algorithm should take a number as input, and output the times table for that number.
number = int(input(“Enter a number”))
for x = 1 to 12
print(number * x)
next x
number = int(input(“Enter a number”))
for x = 1 to 12
print(x * x)
next x
number = int(input(“Enter a number”))
for x = 1 to 12
print(number x x)
next x
number = int(input(“Enter a number”))
for x = 1 to 12
print(number * number)
next x
Which one is a search algorithm?
Random search
Binary search
Denary search
Next item search
Identify the description of a linear search
Put the elements in order, check each item in turn
Put the elements in order, compare to the middle value, split the list in order and repeat
Elements do not need to be in order, check each item in turn
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
Identify the description of a binary search
Put the elements in order, check each item in turn
Put the elements in order, compare to the middle value, split the list in order and repeat
Elements do not need to be in order, check each item in turn
Elements do not need to be in order, compare to the middle value, split the list in order and repeat
Define the term computational thinking
Using a computer
Developing an algorithm to solve a problem
Making a computer use artificial intelligence
Google is computational thinking
Define the term abstraction within computational thinking.
Adding together numbers
Taking a real world problem and designing a computer program that exactly replicates every part of that problem in the computer
Performing multiple calculations on a list of variables
Representing real world problems in a computer program, using symbols and removing unnecessary elements
Define the term decomposition within computational thinking
The breaking down of a program until it no longer exists
The creation of music that can be played on a computer
The breaking down of a problem into smaller problems
The breaking down of waste to make compost
Identify which statement describes algorithmic thinking.
Thinking like a computer
Writing binary numbers
Identifying the steps involved in solving a problem
Identifying what problems need to be solved
A linear search is to be performed on the list below. 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 below. How many comparisons would it take to find the number 9?
0-1
2-3
3-4
It won't find the number 9.
A binary search is to be performed on the list below. How many comparisons would it take to the find the number 101?
0-1
1-2
3-4
4-5
Identify the search performed by the following algorithm:
for x = 0 to 9
if (array[x]==10) then
print(“Found it”)
endif
next x
Linear
Binary
Insertion
Merge
Which of the following is not a sorting algorithm?
Bubble
Insertion
Binary
Merge
Which sorting algorithm is described by: moving through a list repeatedly, swapping elements that are in the wrong order.
Merge
Bubble
Insertion
None of the above
Which sorting algorithm is described by: split a list into individual lists, then combine these, two lists at a time.
Merge
Bubble
Insertion
None of the above
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.
Merge
Bubble
Insertion
None of the above
The following two lists are to be merged, which element first goes into the new merged list
0
1
2
3
The following list is to be sorted using a bubble sort. What will the list look like after the first iteration through the list?
Which sorting algorithm needs to go through the list repeatedly?
Merge
Bubble
Insertion
None of them
Which sorting algorithm splits a list of items into individual lists?
Merge
Bubble
Insertion
None of them
Which sorting algorithm takes an item from the list, and puts it in the correct place in a sorted list?
Merge
Bubble
Insertion
None of them
A program halts and prints an error message, define this error.
Logic error
Maths error
Syntax error
Spelling error
