Flowcharts and Conditional Expressions
Learn to visualize conditional expressions and decisions in a program with the help of flowcharts.
Flowcharts and related terms
Sometimes, it becomes difficult to understand the flow of a complex decision structure in text format. Flowcharting is a technique that visually demonstrates the flow of instructions in a program.
A program that involves decisions also has branches of flow. The expression used to write the decision is called a conditional expression or condition. The flow of the program depends on the result of a condition, which is either true or false. If the condition is true, the part of the program to be executed is called the true branch. Similarly, if the condition is false, the part of the program to be executed is called the false branch. Flowcharts illustrate the branching of flow in such programs.
Note: The terms, statement and instruction, are used interchangeably.
There are several shapes and symbols used in flowcharting. Some of the shapes that we use to make our flowcharts include:
- Start/Stop: It is used to indicate the start and the end of the program.
- Input/Output: It is used for input and output instructions in the program.
- Decision: It is used to write conditional expressions in the program.
- Process: It is used to write instructions other than input/output and conditions in the program.
- Flow: It describes the flow direction from one shape to another.
Get hands-on with 1200+ tech skills courses.