Flowchart
In one line
A flowchart is a visual diagram that represents the flow of control in an algorithm using shapes and arrows.
In simple words
A flowchart is a picture of your algorithm. It uses different shapes to represent different types of operations and arrows to show the order of execution. You can see the entire logic at a glance, including all branches and loops.
Common flowchart shapes: oval for start/end, rectangle for a process/assignment, diamond for a decision (condition), parallelogram for input/output. Arrows connect the shapes and show the path from one step to the next.
Flowcharts are useful for: planning algorithms before coding, explaining logic to non-programmers, documenting complex processes, and spotting logic errors visually. They are especially helpful for understanding branching and looping logic that is hard to follow in code.
Example
Flowchart for checking if a number is even or odd:
[Start] → [Input n] → [n % 2 == 0?]
/ \
Yes No
| |
[Print "Even"] [Print "Odd"]
\ /
[End]The diamond is a decision point. Based on the condition, flow goes to one of two branches, then converges at the end.
Related terms
Related Resources
Related Lessons
- Flowcharts
Learn about flowcharts.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.