Pseudocode & Flowchart

Deniya Edwinraj
3 min readSep 6, 2023

--

Pseudocode

Pseudocode is a term that is often used in programming and algorithm-based fields. It is a methodology that allows the programmer to represent the implementation of an algorithm.

Algorithm: It’s an organized logical sequence of actions or the approach toward a particular problem. A programmer implements an algorithm to solve a problem. Algorithms are expressed using natural verbal but somewhat technical annotations.

Pseudo code: It’s simply an implementation of an algorithm in the form of annotations and informative text written in plain English. It has no syntax like any of the programming languages and thus can’t be compiled or interpreted by the computer.

Guidelines should be remembered while preparing pseudocode :

  1. should be remembered while preparing pseudocode :
  2. Pseudocode should be concise so ignore unnecessary details.
  3. To accept data from users, generally used statements are INPUT, READ, GET, or OBTAIN.
  4. To display the result or any message, generally used statements are PRINT, DISPLAY, or WRITE.
  5. Generally used keywords are capitalized while preparing pseudocode.

How to Write Pseudocode

  1. Define the problem
  2. Identify the main steps
  3. Write the header
  4. Express the logic using constructs
  5. Use variables and data structures
  6. Use clear, concise language
  7. Test and refine

Advantages of Pseudocode:

  1. It allows the designer to focus on the main logic without being distracted by programming language syntax.
  2. Since it is language-independent, it can be translated to any computer language code.
  3. It allows designers to express logic in plain natural language.
  4. It is easier to write actual code using pseudocode.
  5. Unlike algorithms, pseudocodes are concise so pseudocodes are more readable and easier to modify.

THE MAIN CONSTRUCTS OF PSEUDOCODE

  1. SEQUENCE represents linear tasks sequentially performed one after the other.
  2. WHILE a loop with a condition at its beginning.
  3. REPEAT-UNTIL a loop with a condition at the bottom.
  4. FOR another way of looping.
  5. IF-THEN-ELSE is a conditional statement changing the flow of the algorithm.
  6. CASE is the generalization form of IF-THEN-ELSE.

Flowchart

A flowchart is a visual representation of the sequence of steps and decisions needed to perform a process. Each step in the sequence is noted within a diagram shape. Steps are linked by connecting lines and directional arrows. This allows anyone to view the flowchart and logically follow the process from beginning to end.

WHEN TO USE A FLOWCHART

. To develop an understanding of how a process is done
. To study a process for improvement
. To communicate to others how a process is done
. When better communication is needed between people involved with the same process
. To document a process
. When planning a project

COMMONLY USED SYMBOLS IN DETAILED FLOWCHARTS

Types of flowcharts

  1. Document Flowcharts
  2. Data Flowcharts
  3. System Flowcharts
  4. Program Flowcharts
  5. System Flowchart
  6. General Flowchart
  7. Detailed Flowchart

Flowchart Advantages

. Flowchart Advantages

. Helps Identify Specific Steps

. Outlines a Complex Process

. Communicates Ideas Quickly

. Coordinates Team Effort

. Increases Efficiency & Exposes Inefficiencies

. Creates Clear Documentation

. Helps Solve Problems

. Enables Automation

--

--