wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

UNIT 2.1 ALGORITHMS

Total questions: 32

Worksheet time: 11mins

Name
Class
Date
1.
Q1: Identify the search algorithm (1-2)
a)
Random search
b)
Binary search
c)
Denary search
d)
Next Item search
2.
Q2: Identify the description of a linear search (4-5)
a)
Put the elements in order, check each item in turn
b)
Order elements,compare middle value,split list in order&loop
c)
Elements do not need to be in order, check each item in turn
d)
Randomise data,compare middle value,split list in order&loop
3.
Q3: Identify the description of a binary search (4-5)
a)
Put the elements in order, check each item in turn
b)
Order elements,compare middle value,split list in order&loop
c)
Elements do not need to be in order, check each item in turn
d)
Randomise data,compare middle value,split list in order&loop
4.
Q4: Define the term computational thinking (1-2)
a)
Using a computer
b)
Developing an algorithm to solve a problem
c)
Making a computer use artificial intelligence
d)
Google is computational thinking
5.
Q5: Which of the following is not a component of computational thinking? (1-2)
a)
Abstraction
b)
Typing
c)
Decomposition
d)
Algorithmic thinking
6.
Q6: Define the term abstraction within computational thinking (4-5)
a)
Adding together numbers
b)
Create a program that replicates a real world problem
c)
Performing multiple calculations on a list of variables
d)
Represent real world problem & remove unneeded data
7.
Q7: Define the term decomposition within computational thinking (1-2)
a)
The breaking down of a program until it no longer exists
b)
The creation of music that can be played on a computer
c)
The breaking down of a problem into smaller problems
d)
The breaking down of waste to make compost
8.
Q8: Identify which statement describes algorithmic thinking (1-2)
a)
Thinking like a computer
b)
Writing binary numbers
c)
Identifying the steps involved in solving a problem
d)
Identifying what problems need to be solved
9.

Q9: A linear search is to be performed on the list:

12 6 8 1 3


How many comparisons would it take to find the number 1?

a)

1

b)

2

c)

3

d)

4

10.

Q10: A binary search is to be performed on the list:

3 5 9 10 23


How many comparisons would it take to find the number 9?

a)

0-1

b)

43526

c)

43589

d)

It can't find the number 9

11.

Q11: A binary search is to be performed on the list:

1 5 10 13 48 68 100 101


How many comparisons would it take to the find the number 101?

a)

0-1

b)

43497

c)

43558

d)

43589

12.

Q12: Identify the search performed by the following algorithm:


for x = 0 to 9

if (array[x]==10) then

print(“Found it”)

endif

next x

a)

Linear

b)

Binary

c)

Both linear & binary

d)

Neither, it does not work

13.
Q1: Which of the following is not a sorting algorithm? (1-2)
a)
Bubble
b)
Insertion
c)
Binary
d)
Merge
14.

Q2: 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 the above

15.

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

a)

Merge

b)

Bubble

c)

Insertion

d)

None of the above

16.

Q4: 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)

Merge

b)

Bubble

c)

Insertion

d)

None of the above

17.
Q5: What is the first action in an insertion sort? (4-5)
a)
Make a new list
b)
Mark the first item as the ordered list
c)
Compare the first & second elements
d)
Put the first element in the correct place
18.

Q6: The following two lists are to be merged, which element first goes into the new merged list (4-5)

List 1: 2 4 8 9

List 2: 1 6 8 4

a)

0

b)

1

c)

2

d)

3

19.

Q7: 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

20.
Q8: Which sorting algorithm needs to go through the list repeatedly? (4-5)
a)
Merge
b)
Bubble
c)
Insertion
d)
None of them do
21.
Q9: Which sorting algorithm splits a list of items into individual lists. (1-2)
a)
Merge
b)
Bubble
c)
Insertion
d)
None of them do
22.

Q10: 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)

Merge

b)

Bubble

c)

Insertion

d)

None of them do

23.
Q1: Identify the correct definition for ‘algorithm’. (1-2)
a)
A problem
b)
A solution to a problem
c)
The steps that are taken to solve a problem
d)
The words to enter when typing
24.

Q2: Identify the purpose of the following flowchart symbol: (1-2)

a)

Input/Output

b)

Output

c)

Start/Stop

d)

Decision

25.

Q3: Identify the purpose of the following flowchart symbol: (1-2)

a)

Input/Output

b)

Sub-process

c)

Process

d)

Decision

26.
Q4: Define the term computational thinking (1-2)
a)
Input/Output
b)
Sub-process
c)
Process
d)
Decision
27.
Q5: Which of the following is not a component of computational thinking? (1-2)
a)
Process
b)
Input/Output
c)
Sub-process
d)
Decision
28.

Q6: Identify the purpose of the following flowchart symbol: (1-2)

a)

Process

b)

Input/Output

c)

Sub-process

d)

Decision

29.
Q7: How many arrows should come out of a decision symbol in a flowchart?
a)
0
b)
1
c)
2
d)
3
30.

Q6: Identify the purpose of the following flowchart symbol: (1-2)

a)

Process

b)

Input/Output

c)

Sub-process

d)

Decision

31.

The following algorithm should take as input on number, and output the 12 times table for that number. Identify the correct algorithm.

a)

number = input(“Enter a number”)

for x = 1 to 12

print(number * x)

next x

b)

number = input(“Enter a number”)

for x = 0 to 12

print(number * x)

next x

c)

number = input(“Enter a number”)

for x = 1 to 12

print(number X x)

next x

d)

number = input(“Enter a number”)

for x = 1 to 12

print(number * number)

next x

32.

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.

a)

number = input(“Enter a number”)

number = input(“Enter the second number”)

final = (((number + number) * 11) + 4) / 2

print (final)

b)

number = input(“Enter a number”)

number2 = input(“Enter the second number”)

final = (((number + number2) * 11) + 4) * 2

print (final)

c)

number = input(“Enter a number”)

number2 = input(“Enter the second number”)

final = number + number2 +4 *11 / 2

print (final)

d)

number = input(“Enter a number”)

number2 = input(“Enter the second number”)

final = (((number + number2) * 11) + 4) / 2

print (final)