Midterm Lesson1
Midterm Lesson1
What is a flowchart?
A flowchart is a diagram that depicts a process, system or
computer algorithm. They are widely used in multiple fields to
document, study, plan, improve and communicate often complex
processes in clear, easy-to-understand diagrams.
Flowcharts, sometimes spelled as flow charts, use rectangles,
ovals, diamonds and potentially numerous other shapes to define the
type of step, along with connecting arrows to define flow and
sequence.
Flowchart symbols
Terminal/Terminator
Process
Decision
Flowchart symbols
Document
Data, or Input/Output
Stored Data
Flowchart symbols
Flow Arrow
On-page connector/reference
Off-page
connector/reference
Flowchart symbols
Preparation
When to Draw Flowchart?
Using a flowchart has a variety of benefits:
● It helps to clarify complex processes.
● It identifies steps that do not add value to the internal or external customer,
including delays; needless storage and transportation; unnecessary work,
duplication, and added expense; breakdowns in communication.
● It helps team members gain a shared understanding of the process and use
this knowledge to collect data, identify problems, focus discussions, and
identify resources.
● It serves as a basis for designing new processes.
Guidelines for Preparing Flowchart
Example of Pseudocode
Step 1: START
Step 2: READ P, T, R
Step 3: I = P*T*R/100
Step 4: PRINT I
Step 5: STOP
Create a flowchart design that calculates the area of a rectangle:
Start ↓ Enter the length of the In this flowchart:
rectangle (L) ↓ Enter the width of
the rectangle (W) ↓ Calculate the
area: A = L * W ↓ Display the area ● "Start" and "End" represent the beginning and end of the process.
(A) ↓ End ● "Enter the length of the rectangle (L)" and "Enter the width of the rectangle (W)"
are actions that involve user input.
● "Calculate the area: A = L * W" represents the computation of the area of the
rectangle.
● "Display the area (A)" is the action of showing the calculated area to the user.
● The arrows connecting each step indicate the sequence in which these actions
occur.
To calculate the area of the rectangle, you multiply the length (L) by the width (W). The
This flowchart follows a linear sequence without any decision points or branching,
making it a sequence control structure. The answer is the calculated area of the
● "Start" and "End" represent the beginning and end of the process.
● "Initialize sum (Sum = 0)" sets the initial value of Sum to 0.
● The loop, which includes steps to enter a number, add it to the Sum, display
the current sum, and ask if the user wants to add another number.
● If the user selects "Yes," the loop continues, and the process repeats.
● If the user selects "No," the loop exits, and the program ends.