13. SPOT THE DIFFERENCE
First prepare the ingredients,
then clean the fish and remove
the innards. Then air dried for
few hours before boiling in
water and salt. When cooked,
arranged in large wooden racks
and smoked using wood
shavings.
CAUTI
ON:Make sure
you keep the water
bottle cap tightly sealed
when not taking a drink.
Spilling water on any
recorded minutes could
prove disastrous.
15. 1.Describe sequence of instruction.
2. Enumerate or translate the
instructions or steps to achieve the right
output in each situation.
3. Value the importance of Sequence of
instruction
OBJECTIVES
16. is the order in which the
instructions in a program
are carried out.
SEQUENCE OF INSTRUCTION
17. First prepare the ingredients, then clean the
fish and remove the innards. Then air dried
for few hours before boiling in water and
salt. When cooked, arranged in large wooden
racks and smoked using wood shavings.
LOOK AT
THE
EXAMPLES
1.Prepare the ingredients.
2.Clean the fish and remove the
innards. 3.Air dried for few hours
4.Boil in water and salt.
5.When cooked, arranged in large wooden
racks and smoked using wood shavings.
19. 1The above image shows the flow chart
which contains the instructions how to
add two numbers and display it on screen.
The instructions are:
1.Declare variables num1, num2 and sum
2.Read num1 and num2
3.sum =num1 +num2
4.Display sum
20. THREE WAYS YOU CAN CONTROL
THE ORDER OF THESE LINES TO BE
EXECUTED BY THE COMPUTER
1.Sequencing
2.Selection
3.Iteration
21. SEQUENCING
1.This means that the computer
will run your code in order, one
line at a time from the top to the
bottom of your program. I
t will
start at line 1, then execute line 2
then line 3 and so on till it reaches
the last line of your program.
22. SEQUENCING
The instructions in the flowchart
to compute the area of a circle are
1.I
nput Radius
2.Calculate the area by using the
formula
Area =3.14 *radius *
radius
3.Display Area
The list of instructions is in
sequential form.
23. SELECTION
Sometimes you only want some lines
of code to be run only if a condition is
met, otherwise you want the
computer to ignore these lines and
jump over them. This is achieved using
I
F statements. e.g. I
f a condition is met
then some lines are executed and
other lines are not executed.
24. The instructions in the flowchart to compute display
the bigger number between two numbers are:
1.Accepts A and B
2
. I
f A >B
3. True, Display A
4. False, Display B
Here, if the condition is true, the instruction to
display A is executed and there is no need to execute
the display B instruction.
This is an example of Selection or decision type of
instructions
SELECTION
25. Sometimes you want the computer to
execute the same lines of code several
times. This is done using a loop. There
are three types of loops:For loops,
while loops and repeat until loops.
That’s handy as it enables you not to
have to copy the same lines of code
many times.
ITERATIO N
26. The instructions in the flowchart to display “Hello
World” 10 times are:
1. I
nitialize Count to 0
2.Print “Hello World”
3.I
ncrement count by 1
4.I
s count <10
5
.I
f yes or true, go to Print “Hello World”
6
. I
f no, end the program
The program will only end if count reaches 10 which
will make the condition false, 10 <10, because it is
already equal.
ITERATION
27. AC TIVITY 1
: GIVIN G
DIREC TIO N S
Describe two ways if someone
has asked you how to go to the
nearest church.Make your house
as the starting point.
28. RUBRIC
4 3 2 1 SCORE
Solution A completed steps
or instructions and
has met what is
asked in the
situation.
A completed steps
or instructions and
has almost met what
is asked in the
situation.
A completed steps
or instructions but
has not met what is
asked in the
situation.
Incomplete steps or
instructions and has
not met what is
asked in the
situation.
29. WRITING INSTRUCTIONS
Enumerate the instructions or steps to achieve the right output in each
situation. You can write the instructions in a plain language description
or not in formal programming language statements.
1.What are the instructions or steps to compute the average of 5
numbers?
2.What are the instructions or steps to display if the inputted number is
positive or negative?
3.What are the instructions or steps of a program that will only allow
to login the username “administrator” if the password is correct?
30. RUBRIC
4 3 2 1 SCORE
Solution A completed steps
or instructions and
has met what is
asked in the
situation.
A completed steps
or instructions and
has almost met what
is asked in the
situation.
A completed steps
or instructions but
has not met what is
asked in the
situation.
Incomplete steps or
instructions and has
not met what is
asked in the
situation.