Week 2
Week 2
• A set of step-by-step
instructions to solve a
problem.
• They are written as a flowchart
or in pseudocode.
Representing an
Algorithm
Types of representations
Pseudocode Flowcharts
INPUT
OUTPUT
WHILE – a loop (iteration that has a condition at the
beginning)
FOR – a counting loop (iteration)
REPEAT – UNTIL – a loop (iteration) that has a condition at
the end
IF – THEN – ELSE – a decision (selection)
ACTIVITY
Design a pseudocode and a flowchart that asks people
what is the best subject they take.
REPEAT
ELSE