Font size
WorksheetsYEAR 5-CA2-ALGORITHMS
Total questions: 10
Worksheet time: 6mins
What is an algorithm?
An unordered set of instructions
A precise set of instructions to complete a task.
IF you study hard, THEN you get good marks.
What is the condition?
you study hard
get good marks
In the statement "IF you press the power button, THEN the computer turns on.", what is the action?
IF
you press the power button
THEN
the computer turns on
An algorithm that requires less steps and less time to complete a task is considered as an ____________ algorithm
longer
efficient
bad
What is the primary purpose of identifying errors in an algorithm?
To make it look more complex.
To make sure it produces the correct results.
To change the programming language.
To make it run slower.
The __________ statement is used when you want to perform an action only if a condition is true.
IF-THEN-ELSE
When a condition in an IF-THEN-ELSE statement is false, the (a) part is executed.
a. IF
b. THEN
c. ELSE
Two characters in an algorithm where one's action impacts the other are called:
Independent objects
Simple objects
Interrelated objects
for the desired output, identify the error in the algorithm below:
step 1: move 1 block forward
step 2: IF the block contains a flag, THEN fill in green colour.
ELSE blue colour
step 3: Repeat steps 1 and 2 five more times
The algorithm should fill in red color for blocks with flags.
The algorithm should fill in green color for blocks with flags.
Which algorithm is efficient?
a) algorithm-1
b) algorithm-2
(a)
