2. Process
Procedure
Algorithm
A series of actions or steps taken to achieve an end.
A series of actions conducted in a certain order.
An ordered set of steps to solve a problem.
8. Pseudocode
Written language that is part-code English and helps a programmer to plan the layout
of his program.
Example:
Define N
N 15
Multiply N by 100
Print N to Main Label
9. How to write pseudocode
A computer can:
1. Receive information (Read, Obtain, Get)
2. Put out information (Print, Display, Show)
3. Perform arithmetic (Compute, Calculate, Determine, Increment, Decrement,
Compare)
4. Assign a value to a variable or memory location (Define, Set, Init)
5. Compare two variables and select one of two alternate actions (IF, THEN, ELSE,
ELSE-IF, ENDIF)
6. Repeat a group of actions (FOR, NEXT, WHILE, ENDWHILE, REPEAT, UNTIL)
16. Class activity
Smoke detection code:
If smoke sensor detect
upnormal amount of smoke,
then alarm system activate
(sound alarm, light change,
send sms, autocall), then
smoke controller runs, open
sprinklers, open ventilation
system.
17. Homework (Solar Tracker)
Azimuth – This is the compass angle of the sun as it moves
through the sky from East to West over the course of the day.
Zenith – This is the angle of the sun looking up from ground
level or the horizon.
Design an algorithm by using pseudocode for a
solar tracker. This solar tracker must follow the
sun in order to get the most efficient output.
Please specify how both azimuth and zenith
can be used for this purpose.
18. Class activity
Write a very detailed and
step-by-step paragraph on
how to find the shortest
path.
Start: A
End: C