Computer ScienceChapter 2: Computational Thinking and Algorithms
2.8.1 Flowcharts
Flowchart:
Explanation level
This topic explains what a flowchart is, its importance in solving problems, the steps and symbols for drawing one, and how to create flowcharts using Microsoft Visio.
Definition
Flowchart: A flowchart is a diagrammatic representation of an algorithm. It describes what operations are required to solve a given problem.
Core Concept
A flowchart is like a roadmap for solving a problem. Just as a roadmap shows you the path from start to destination with clear turns and landmarks, a flowchart shows the sequence of operations needed to solve a problem—from start to end—using standard symbols. It helps programmers visualize the logic before writing code, making it easier to spot errors and communicate the solution to others.
Detailed Explanation
Importance of Flowchart in Solving a Problem
- Flowchart illustrates the sequence of operations to be performed to solve a problem in the form of a diagram.
- Computer programmers draw flowcharts before writing computer programs.
- It provides an easy way to analyze and find solutions to problems.
- Once the flowchart is drawn, it becomes very easy to write the program in any computer language.
- It is very helpful in communicating the problem-solving method to other people.
- It also helps in finding and removing logical errors.
Steps for Drawing a Flowchart
The flowchart developer must determine the following requirements for the given problem or algorithm before drawing a flowchart:
- Start of the flowchart
- Input to the flowchart
- Type of processing required
- Decision to be taken
- Output of the operation
- End of the flowchart
1. Start of the Flowchart: Every flowchart should start with a trigger. The graphical representation of start of flowchart is oval shape.
2. Input to the Flowchart: The flowchart designer must know what exactly the input to the flowchart is. The input is determined from the problem statement. For example, the given problem is to convert temperature from Fahrenheit to Celsius. Here, the input will be the temperature in Fahrenheit. The graphical representation of input is parallelogram.
3. Processing in the Flowchart: The flowchart designer must decide what type of calculation is to be performed or what formula is applied to obtain the required result. For example, to find the area of a triangle: Area = Base × Height2 The graphical representation of processing symbol is rectangle.
4. Decision Making in Flowchart: The flowchart designer must decide which control structure (sequence, repetition, or selection) is to be applied for the solution of the problem. For example, selection structure must be applied to print letter grade of a student based on the marks obtained. The selection structure will check in which range the marks fall and accordingly print the grade. Graphically the decision is represented with a diamond.
5. Output: The flowchart must provide the required output. The output is represented with a parallelogram symbol as well.
6. End of Flowchart: The flowchart should have a defined end, and because of the possibility of multiple decision points, it may have multiple ends. For end of flowchart the oval symbol is used.
Flowchart Symbols Summary
| Symbol | Shape | Purpose |
|---|---|---|
| Start/End | Oval | Beginning or end of flowchart |
| Input/Output | Parallelogram | Data input or output |
| Process | Rectangle | Calculation or operation |
| Decision | Diamond | Condition or decision point |
| Flow Line | Arrow | Direction of flow |
Flowchart to Solve Problems
Flowchart 1: Flowchart to find sum, product, and average of five numbers.
From the statement of the flowchart, it is clear that sum, product, and average are to be calculated, and given are five numbers.
- Start
- Input A, B, C, D, E
- SUM = A + B + C + D + E
- PROD = A × B × C × D × E
- AVG = SUM / 5
- Output SUM, PROD, AVG
- End
How to Create a Flowchart in Microsoft Visio
a) Start Microsoft Visio. b) Click on the category of Flowchart. c) Double-click the Basic Flowchart. d) For each step you wish to design in the process, drag a relevant flowchart symbol and place it onto your drawing. e) Connect the flowchart shapes by holding the mouse pointer over the first symbol, and then releasing it on the other symbol you wish to connect to. f) To place text into a shape, select it, and then type.
LARP (Logics of Algorithms and Resolution of Problems)
LARP is a programming language for rapid development of prototypes. However, unlike C++, Java, and other programming languages, LARP uses semi-natural syntax. Therefore, it is very easy for non-programmers to understand. LARP also allows algorithms to be expressed as flowcharts.
Intermediate Level
A flowchart is a diagrammatic representation of an algorithm, showing the sequence of operations needed to solve a problem. It uses standard symbols: oval (start/end), parallelogram (input/output), rectangle (process), and diamond (decision). Flowcharts help in analyzing problems, communicating solutions, and finding logical errors before coding. To draw a flowchart, identify the start, input, processing, decisions, output, and end. Tools like Microsoft Visio make it easy to create flowcharts by dragging and connecting shapes. LARP is a language that allows algorithms to be expressed as flowcharts.
Important Points
- - Flowchart = diagrammatic representation of an algorithm.
- - Symbols: oval (start/end), parallelogram (IO), rectangle (process), diamond (decision).
- - Helps in analysis, communication, and error detection.
- - Steps: start, input, processing, decision, output, end.
- - Microsoft Visio is used to create flowcharts.
- - LARP is a language for rapid prototyping using flowcharts.
- - Flowcharts are language-independent.
Remember
- - Flowchart: Diagram of steps.
- - Oval: Start/End.
- - Parallelogram: Input/Output.
- - Rectangle: Process.
- - Diamond: Decision.
- - Arrow: Flow direction.
- - Visio: Flowchart tool.
- - LARP: Flowchart-based prototyping language.
Common Mistakes
- - Using wrong symbols: Oval for start/end, parallelogram for IO, rectangle for process, diamond for decision.
- - Forgetting the end symbol: Every flowchart must have a clear end.
- - Skipping decision points: Decisions are essential for selection and repetition.
- - Not labeling arrows: Arrows should show the direction of flow.
- - Assuming flowcharts are only for programming: They are used in many fields for process design.
Quick Revision
A flowchart is a diagrammatic representation of an algorithm. It uses standard symbols: oval (start/end), parallelogram (input/output), rectangle (process), and diamond (decision). Flowcharts help in analyzing problems, communicating solutions, and finding logical errors before coding. Steps include start, input, processing, decision, output, and end. Microsoft Visio is a common tool for creating flowcharts. LARP is a language that supports flowchart-based algorithm design.
60-Second Revision
- Oval: Start/End.
- Parallelogram: Input/Output.
- Rectangle: Process.
- Diamond: Decision.
- Arrow: Flow direction.
Did you understand this topic?
Your answer is saved with your learning record. It does not mark the topic as mastered.
Quick revision
Revision Zone
Review the key facts, formulas and checks before you move on.2.8.1 Flowcharts
Sticky Notes · Quick Revision
Key Point 1
- Flowchart: Diagram of steps.
Key Point 2
- Oval: Start/End.
Key Point 3
- **Parallelogram:** IO.
Key Point 4
- Rectangle: Process.
Key Point 5
- Diamond: Decision.
Key Point 6
- Visio: Tool.
Key Point 7
- LARP: Prototyping language.
Key Point 8
- Flowcharts = Language-independent.
Same supplied content as this Notes page (shared canonical source).