0% found this document useful (0 votes)
112 views

Algorithm and Flow Chart

This presentation discusses algorithms and flowcharts. It defines an algorithm as a finite set of steps to solve a particular problem, as opposed to a computer program which is an implementation of an algorithm for a specific system. An example algorithm is provided to calculate a student's final grade. Key aspects of algorithms like inputs, outputs, definiteness, finiteness and effectiveness are covered. A flowchart is described as a graphical representation of an algorithm's logic and control flow. Common flowchart symbols are shown. Two example problems are provided - one to calculate a student's grade, the other to convert feet to centimeters - and homework is assigned to create an algorithm and flowchart for making tea.

Uploaded by

anees
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
112 views

Algorithm and Flow Chart

This presentation discusses algorithms and flowcharts. It defines an algorithm as a finite set of steps to solve a particular problem, as opposed to a computer program which is an implementation of an algorithm for a specific system. An example algorithm is provided to calculate a student's final grade. Key aspects of algorithms like inputs, outputs, definiteness, finiteness and effectiveness are covered. A flowchart is described as a graphical representation of an algorithm's logic and control flow. Common flowchart symbols are shown. Two example problems are provided - one to calculate a student's grade, the other to convert feet to centimeters - and homework is assigned to create an algorithm and flowchart for making tea.

Uploaded by

anees
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Topic of Presentation

Algorithm
&
Flow Chart
Class 10th computers
Presented by
Anees Ahmed Awan
Roll No. BC180400258

Department of Education
Virtual University of Pakistan
Algorithms and Flowcharts
A typical programming task can be divided into two
phases:
 Problem solving phase
Produce an ordered sequence of steps that describe solution
of problem this sequence of steps is called an algorithm
 Implementation phase
implement the program in some programming language
Algorithms
 An algorithm is a finite set of steps defining the solution of a particular
problem.
 Need not to belong one particular language
 Sequence of English statements can also be algorithm
 It is not a computer program
 An algorithm can be expressed in English like languages
 Its can also be expressed in the form of flowchart.
Example
 Write an algorithm to determine a student’s final grade
and indicate whether it is passing or failing. The final
grade is calculated as the average of four marks.
Detailed Algorithm
 Step 1: Input M1,M2,M3,M4
 Step 2: GRADE (M1+M2+M3+M4)/4
 Step 3: if (GRADE < 50) then
 Print “FAIL”
 else
 Print “PASS”
 End
Computer Program ?
 Set of instructions to perform some specific task

 Code: refers to statements that are written in any programming


language as machine code or C code.
 Code is some time interchangeably used with program
Is Program itself a Software ?
Algorithm Vs Program
What is the difference between an algorithm and a program?
A program is an implementation of an algorithm to
be run on a specific computer and operating system.
An algorithm is more abstract it does not deal with
machine specific details think of it as a method to
solve a problem.
Algorithm Specification
Every algorithm must satisfy the following criteria :
Input. Zero or more quantities are externally supplied.
Output. At least one quantity is produced.
Definiteness. Each instruction must be clear and
unambiguous(Unique meaning).
Finiteness. An algorithm terminates in a finite number of steps.
Effectiveness. Every instruction must be basic enough to be
carried out than, means not so complex.
Flowchart
A Flowchart is a graphical or symbolic
representation of a problem in the sequence of
operations
It shows logic of an algorithm
It emphasizes individual steps and their
interconnections
e.g. control flow from one action to the next
Flow Chart Symbols
EXAMPLE 1

Write an algorithm to determine a student’s final


grade and indicate whether it is passing or failing.
The final grade is calculated as the average of four
marks.
EXAMPLE 2

Write an algorithm and draw a flowchart to convert the


length in feet to centimeter.
Any Question ?
Home Work Assignment

Write an algorithm to make a tea also


Draw Flow chart of that Algorithm.

E-mail ID for Assignment submission: [email protected]


Thanks

You might also like