Professional Documents
Culture Documents
Week 4
Week 4
7. After the water boils, leave the tea and pour the water over it.
9. When the water boils, let it rest for a while and turn off the fire.
11. Add (or leave out) as much sugar as you want into your tea and stir.
1. START
2. Read the value of X
3. Read the value of Y
4. T = X + Y
5. Print the value of T
6. END
Another example
Write pseudocode for a program that calculates the area of a triangle and outputs
the result to the screen.
Select A for the area, B for the base length, and H for the height.
1. START
2. Read the value of B
3. Read the value of H
4. A = (B * H) / 2
5. Print the value of A
6. END
Flow Chart
Flowcharting is the visualization of problem-solving steps.
Each operation is represented by a specific geometric
shape.
Arrows between shapes indicate the flow between
operations.
When looking at a flowchart, the overall structure can be
understood through commonly accepted shapes.
Flow Chart Example
Flow chart components
What are the Basic Symbols of a
Flowchart?
Let's go over each flowchart symbol individually.
Start/End: Use this shape for the initial and final steps of your
process
Process
The Process: This shape represents a general step in your
process. It is the most commonly used shape in almost
all operations.
Output
Document: This shape is used to indicate sending a document to peripheral devices such as a disk or printer.
Decision
Decision: This shape indicates the point where
a decision determines the next step in the
process. There may be multiple outcomes, but
typically there are two outcomes, yes and no.
Unlike other shapes, there is an exit for each
outcome.
Input/Output
3. Repetition phrases
I. while
II. do .. while
III. for