wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Algorithm

Total questions: 40

Worksheet time: 22mins

Name
Class
Date
1.
What is the correct definition of an algorithm?
a)
An algorithm is a step by step instructions to solve a problem.
b)
An algorithm is a process of baking bread.
c)
An algorithm is a software used to compute numbers.
d)
An algorithm is the process of breaking problems.
2.
What is this ?
a)
Pseudocode
b)
Flow chart
c)
Syntax
3.
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
4.

An _______________ is a precise,step by step set of instructions to perform a specific task.

a)

task

b)

sequence

c)

sub-tasks

d)

algorithm

5.

Are you ready?

a)

yes

b)

no

6.

____________ can be considered an example of an algorithm

a)

answer to a question

b)

name of a person

c)

favorite subjects

d)

a recipe for making pancake

7.

An algorithm is a set of __________ followed to complete a task.

a)

values

b)

points

c)

scores

d)

instructions

8.

An algorithm should be in the right order.

a)

True

b)

False

9.

When you write an algorithm you need to include ________, step-by-step instructions.

a)

precise

b)

multiple

c)

ambiguous

d)

interesting

10.

The options below contain the instructions for making a smoothie: Which one should come first?

a)

Put the lid on the blender.

b)

Add fruit to the blender.

c)

Switch the blender on.

d)

Add milk to the blender.

11.

An algorithm can be written as a pseudocode?

a)

True

b)

False

12.
All the steps in problem-solving are correctly stated EXCEPT:
a)
define the problem
b)
propose some solutions
c)
determine the best solution
d)
test and validate the solution
13.
The divide-and-conquer approach is used to:
a)
define a problem
b)
validate a solution
c)
decompose large problems
d)
create solution algorithms
14.
All the following statements about problem decomposition are correct EXCEPT:
a)
significant components are input, process and output.
b)
an IPO chart may be used to delineate the components.
c)
problems are broken down into simpler sub problems.
d)
problem decomposition simplifies the problem in step.
15.
The question is based on the following algorithm: SET pi to 3.14SET radius, circumference TO 0 READ radius LET circumference=2*pi*radius The identifier pi is an example of a:
a)
constant
b)
data type
c)
string
d)
variable
16.
The question is based on the following algorithm: SET pi to 3.14 SET radius, circumference TO 0 READ radius LET circumference=2*pi*radius The identifier radius is an example of a:
a)
constant
b)
data type
c)
string
d)
variable
17.
Which of the following is NOT a characteristic of an algorithm?
a)
finite number of steps
b)
flow of control is forward
c)
precise
d)
unambiguous
18.
Which of the following represent a string?
a)
Nia
b)
C
c)
True/false
d)
-8.0
19.
Which of the following is a integer
a)
540
b)
13.5
c)
both
d)
yes
20.
The two main phases of problem solving comprise ______ and _________.
a)
algorithm, execution
b)
algorithm, implementation
c)
definition, execution
d)
definition, implementation
21.
Column 1, 2, and 3 represent:
a)
read, store and write
b)
output, store and input
c)
write, process and read
d)
input, process and output
22.
Column 2 represent the
a)
storage
b)
input
c)
process
d)
output
23.
The terms ‘letter’ and ‘grade’ in column 2 are:
a)
constants
b)
keywords
c)
variables
d)
subroutines
24.
All of the following are data type EXCEPT:
a)
Real
b)
Character
c)
String
d)
Input
25.
An example of a data type is
a)
integer
b)
vat
c)
NOT
d)
AND
26.
Which of the following data type is the most suitable to represent day or night?
a)
Boolean
b)
String
c)
Real
d)
Character
27.
Which of the following data type is the most suitable to represent current year?
a)
Integer
b)
Real
c)
String
d)
Boolean
28.
Which of the following data type is the most suitable to represent someone height?
a)
String
b)
Real
c)
Character
d)
Integer
29.
The data type that can only contain one of two value True/False, Yes/No, Male/Female is:
a)
Boolean
b)
String
c)
Character
d)
Real
30.
_________ holds your data for later
a)
Object
b)
Expression
c)
Variable
d)
Value
31.
What does IPO stand for?
a)
Input, Proccessing, Output
b)
In Proccess Out
c)
Input, Process, Output
d)
Input, Practical, Output
32.

Which of these is a string?

a)

"Banana"

b)

5.8

c)

8j

d)

7

33.

Which is the best description of a complex integer?

a)

An equation

b)

Algebra

c)

Words and numbers

d)

The word "complex."

34.
Which data type is used to store:
TRUE
a)
Boolean
b)
Double
c)
String
d)
Integer
35.
Which data type is used to store:
100
a)
Integer
b)
Double
c)
Boolean
d)
String
36.
Which data type is used to store:
"D"
a)
Character
b)
String
c)
Integer
d)
Double
37.
This data type is used to store whole numbers
a)
Integer
b)
Double
c)
Boolean
d)
String
38.
This data type is used to store a mixture of letters and numbers and symbols.
a)
String
b)
Character
c)
Boolean
d)
Integer
39.

What is a variable?

a)

A storage location of memory which can change

b)

A random area to store things in.

c)

Something that changes

d)

Something that can only store numbers

40.

What is a Constant?

a)

A storage location of memory which does not change

b)

A random area to store things in.

c)

Something that changes

d)

Something that can only store numbers