Module: M3-R5: Python Programming
Chapter: Ch1 Computer Intro
A flowchart is a visual representation of an algorithm or a process. It uses different shapes and arrows to show the flow of control and steps that must be followed to solve a problem. Flowcharts make it easier to understand, design, and communicate program logic.
Flowcharts are helpful during the planning stage of programming because they clearly show the order of actions and help identify any mistakes before writing actual code.
| Symbol | Name | Purpose | Shape Example |
|---|---|---|---|
| 🟢 | Terminator (Start/End) | Used to represent the start or end of a process. | Start / End |
| ⬜ | Process | Represents a task, action, or operation. | Process |
| 🔷 | Decision | Used when a decision or condition must be checked (Yes/No). | |
| 🟨 | Input/Output | Represents input (reading data) or output (displaying data). | I / O |
| ➡️ | Arrow Lines | Show the direction of the flow of control. | → |
Below is a simple flowchart that shows how two numbers are added:
Start ↓ Input A, B ↓ Sum = A + B ↓ Print Sum ↓ Stop
Start
↓
Input A, B
↓
Is A > B?
/ \
Yes No
| |
Print A is Largest
Print B is Largest
↓
Stop
Flowcharts make it easy to understand algorithms visually. They use symbols to show how data and logic flow through a program. By using flowcharts before coding, programmers can design efficient and error-free programs.