wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Algorithms

Total questions: 21

Worksheet time: 11mins

Name
Class
Date
1.

What is the purpose of using trace tables in programming?

a)

To optimize program execution

b)

To create visual representations of code

c)

To spot logic errors and test the accuracy of an algorithm

d)

To write code more efficiently

2.

What does each column in a trace table represent?

a)

The state of a variable at a specific point in the program

b)

Each line of code in the program

c)

The input provided by the user

d)

The output of the program

3.

What are algorithms used for?

a)

To plan out the solution to a problem

b)

As a platform to program a solution

c)

To test a solution to a problem

4.

What is decomposition?

a)

Searches the computer's memory for data

b)

Repeats a program

c)

Getting small part of a problem and adding them together

d)

Breaking down a complex problem

5.

What is abstraction?

a)

Removal of certain details, keeping relevant the information

b)

Stores data in a program for retrieval

c)

Freedom from representing art

d)

Detects errors while program is running

6.

What is a flowchart?

a)

A diagram that represents a set of instructions

b)

A high-level language that has specific syntax

c)

A way of describing a set of instructions that doesn’t use specific syntax

7.

What is the correct symbol for a process instruction in a flowchart?

a)

A rectangle

b)

A parallelogram

c)

A square

8.

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

a)

A parallelogram

b)

A rectangle

c)

A square

9.

What is the correct symbol for a decision in a flowchart?

a)

A rectangle

b)

A diamond

c)

A square

10.
Which type of lists or data sets are linear searching algorithms used for?
a)
Unsorted lists or data sets
b)
Sorted lists or data sets
11.
Which type of lists or data sets are binary searching algorithms used for?
a)
Unsorted lists or data sets
b)
Sorted lists or data sets
12.

Select the best description to explain what a binary search algorithm is.

a)

Put the elements in order, check each item in turn.

b)

Put the elements in order, compare with the middle value, split the list in order and repeat.

c)

Elements do not need to be in order, check each item in turn.

d)

Elements do not need to be in order, compare to the middle value, split the list in order and repeat

13.
A linear search is to be performed on the list:
12   6   8  1  3
How many comparisons would it take to find number 1?
a)
1
b)
2
c)
3
d)
4
14.
A binary search is to be performed on the list:
3  5  9  10  23
How many comparisons would it take to find number 9?
a)
0-1
b)
2-3
c)
4-5
d)
I can't find the number 9
15.
moving through a list repeatedly, swapping elements that are in the wrong order
a)
Bubble Sort
b)
Insertion Sort
c)
Merge Sort
d)
Quick Sort
16.
uses two lists, one for sorted elements and one for unsorted elements.
a)
Bubble Sort
b)
Insertion Sort
c)
Merge Sort
d)
Quick Sort
17.
Splits a list into individual elements, joining together in multiples of 2 until one sorted list is left
a)
Bubble Sort
b)
Insertion Sort
c)
Merge Sort
d)
Quick Sort
18.
Which sorting algorithm needs to go through the list repeatedly?<br />
a)
Bubble Sort
b)
Insertion Sort
c)
Merge Sort
d)
Quick Sort
19.
Which sorting algorithm splits a list of items into individual lists?
a)
Bubble Sort
b)
Insertion Sort
c)
Merge Sort
d)
Quick Sort
20.
Which type of sort algorithm is this?
a)
Bubble
b)
Merge
c)
Insertion
21.
Which type of sort algorithm is this?
a)
Bubble
b)
Merge
c)
Insertion