Saturday, August 12, 2023

TRANSLATING FLOWCHART ALGORITHM TO PSEUDOCODE FORMAT

LESSON OBJECTIVES:

By the end of the lesson, pupil will be able to.
  1. Define the terms, Algorithm, Flowchart and Pseudocode in their own words.
  2. State three (3) importance of using pseudocode.
  3. Distinguish between flowchart and pseudocode.
  4. write an algorithm using flowchart format and convert the same flowchart algorithm into a pseudocode format.
DEFINITION OF TERMINOLOGIES:

An algorithm is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. It is a step-by-step approach in solving a specific task given.

A flowchart is a diagram that represents a workflow or process. It is a graphical representation of the steps involved in completing a task.

Flowcharts use standardized symbols to represent different types of steps, such as:

  • Process: A rectangular box represents a process step.
  • Decision: A diamond represents a decision point.
  • Input/Output: An oval represents an input or output.
  • Connector: A line with an arrowhead represents a connector.
















Pseudocode is a high-level description of an algorithm or program that is written in a natural language, like English, rather than a programming language.

It is used to describe the steps involved in solving a problem or carrying out a task, without getting bogged down in the details of a specific programming language.

KEY FEATURES OF PSEUDOCODE:

  1. It is written in a natural language: Pseudocode is written in a natural language like English, rather than a programming language. This makes it easier for people to understand, even if they are not familiar with programming.
  2. It is not specific to any programming language: Pseudocode is not specific to any programming language. This means that it can be used to describe algorithms that can be implemented in a programming language.
  3. It is not executable: Pseudocode is not executable. This means that it cannot be run as a program. However, it can be used to create a blueprint for a program that can be implemented in a programming language.
Pseudocode









IMPORTANCE OF USING PSEUDOCODE

  1. Abstraction: Pseudocode is more abstract than actual code. This means that it does not get bogged down in the details of a specific programming language. For example, pseudocode might use the term "variable" to refer to a data storage location, without specifying the type of variable or the programming language in which it will be implemented.
  2. Natural language: Pseudocode is written in natural language, while actual code is written in a programming language. This makes pseudocode easier to read and understand for people who are not familiar with programming.
  3. Execution: Pseudocode is not executable, while actual code is. This means that pseudocode cannot be run as a program, but actual code can.

DIFFERENCES BETWEEN FLOWCHARTS AND PSEUDOCODE:

  1. Flowcharts are graphical representations of algorithms, while pseudocode is a textual representation of algorithms. This means that flowcharts use symbols to represent different steps in an algorithm, while pseudocode uses natural language to describe the steps.
  2. Flowcharts are often used to communicate algorithms to non-technical audiences, while pseudocode is often used to communicate algorithms to technical audiences. This is because flowcharts are more visual and easier to understand for people who are not familiar with programming, while pseudocode is more precise and easier to understand for people who are familiar with programming.
  3. Flowcharts are less flexible than pseudocode. This is because flowcharts are limited to the set of symbols that are used to represent different steps in an algorithm. Pseudocode, on the other hand, can use any natural language to describe the steps in an algorithm.

DIFFERENCES BETWEEN PSEUDOCODE AND ACTUAL CODE

  1. Abstraction: Pseudocode is more abstract than actual code. This means that it does not get bogged down in the details of a specific programming language. For example, pseudocode might use the term "variable" to refer to a data storage location, without specifying the type of variable or the programming language in which it will be implemented.
  2. Natural language: Pseudocode is written in natural language, while actual code is written in a programming language. This makes pseudocode easier to read and understand for people who are not familiar with programming.
  3. Execution: Pseudocode is not executable, while actual code is. This means that pseudocode cannot be run as a program, but actual code can.


Lesson

TRANSLATING FLOWCHART ALGORITHM TO PSEUDOCODE FORMAT

LESSON OBJECTIVES: By the end of the lesson, pupil will be able to. Define the terms, Algorithm, Flowchart and Pseudocode in their own wo...