KEMBAR78
Algorithms and Flowcharts | PDF | Algorithms | Computer Program
0% found this document useful (0 votes)
7 views2 pages

Algorithms and Flowcharts

The document explains algorithms as finite sequences of instructions that convert input into output, emphasizing the need for computer language for execution. It outlines the characteristics of a good algorithm, such as input, generality, and definiteness, and introduces flowcharts as a visual representation of algorithms. Additionally, it discusses the advantages and disadvantages of flowcharting in terms of presentation, coding, debugging, and complexity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

Algorithms and Flowcharts

The document explains algorithms as finite sequences of instructions that convert input into output, emphasizing the need for computer language for execution. It outlines the characteristics of a good algorithm, such as input, generality, and definiteness, and introduces flowcharts as a visual representation of algorithms. Additionally, it discusses the advantages and disadvantages of flowcharting in terms of presentation, coding, debugging, and complexity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Algorithms and Flowcharts

● Machines are mostly used to convert input into output.


● The process that makes this possible can be expressed as a set of
instructions.

Algorithms
● Algorithms: An algorithm is a finite sequence of step wise instructions to
perform a task.
● GR: Algorithms must be written in computer language for the computer to
execute it.
○ Computers cannot understand English or other languages.
● Computer program: An algorithm written in a computer language is called a
computer program.
● Computer programming: Act of writing an algorithm in a computer
language.

Writing an Algorithm
● An algorithm should have a finite number of steps.
● Each step should specify a definite action
● It should take input and produce output.
● Variables should be used when necessary
○ Variables are named containers that store values temporarily.
○ The assignment symbol or sign of equality (=) is used to store the
values.
● Each step should be referred to by a step number.
● Mathematical expressions should be used to perform calculations.

Characteristics of a good algorithm


● Input: An algorithm should be able to receive inputs
● Generality: An algorithm should be able to work on different sets of inputs
provided by the users.
● Finiteness: An algorithm should stop after execution of a finite number of
instructions.
● Output: An algorithm should produce the desired output.
● Definiteness: An algorithm should be precisely defined so that everyone takes
the same action.
● Uniqueness: The result of each step should be uniquely defined and should
depend on the input and results of previous steps.
Flowchart
● A Flowchart is a diagrammatic representation of an algorithm in which steps
are laid in a logical order using geometrical symbols.

(one page connectors are referred by numbers and offpage by letters)

Features of a flowchart
● A flowchart must have one start and stop button
● It’s direction of flow is generally top to bottom or left to right.
● Arrow lines should not cross each other.
● Arrowheads depict the flow of information or sequence of steps

Advantages of flowcharting
● Presentation: The logic of the solution can easily be communicated to
concerned people.
● Coding: Flowcharts can easily be translated into computer programs.
● De-bugging: Flowcharts make it easy to spot errors in the solution
● Evaluation: The steps of the solution can easily be tested
● Documentation: Flowcharts can be used to easily document a process.

Disadvantages of flowchart
● Hard to change
● Unsuitable for complex logic
● Unsuitable for all types of solutions. (Eg: Recursion)

You might also like