SlideShare a Scribd company logo
1 of 15
ALGORITHM, PSEUDOCODE AND FLOW CHART
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 1
ALGORITHM
 A finite set of steps that specify a sequence of operations to be carried out in order to solve a specific
problem.
 It consists a set of explicit and clearly defined finite steps to carry out for a given set of initial conditions,
produce the corresponding output and terminate after a fixed amount of time.
 Tells the computer to solve the problem in a systematic way to get the desired output.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 2
CHARACTERISTICS OR PROPERTIES OF ALGORITHMS
 Finiteness- must terminate in finite number of steps.
 Simplicity- Should be simple and easy to read.
 Absence of Ambiguity- each step must be clear and unambiguous.
 Feasibility- each step must be simple enough that it can be easily translated into the required language.
 Completeness and correctness- must be complete and correct.
 Input-These are zero or more values which are externally supplied to the algorithm.
 Output-At least one value is produced.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 3
STEPS TO WRITE ALGORITHM
 Start the algorithm.
 Take input from user.
 Process the input data.
 Produce one or more results after processing.
 Show the result.
 Exit the algorithm.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 4
VERIFYING THE ALGORITHMS
 To ensure the efficient execution of program, it is necessary to verify the algorithm before converting it
into a computer program.
 Different methods to verify are:
 Dry run: find the value of each variable manually after every step.
 Review: studying the logic and computing with a specification.
 Walk through: presented to the team member for checking the efficiency.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 5
EXAMPLE FOR AN ALGORITHM
 Add two numbers.
 Step 1: Start algorithm.
 Step 2: Enter two numbers a, b.
 Step 3: Compute c = a + b.
 Step 4: Print c.
 Step 5: Exit.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 6
FLOW CHART
 A pictorial representation of problem and algorithms to its solution that uses the symbols connected by
flow lines.
 Called flow chart because it charts the flow of program.
 Used in expressing and understanding algorithms.
 Useful for the programmer and system analyst.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 7
SYMBOLS USED FOR FLOW CHART
 The terminator symbol:
 represented by rectangle by rounded ends.
 Indicates the start and stop of the flow chart.
 Input output symbol:
 Represented by parallelogram.
 Indicates input output operation.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 8
SYMBOLS USED FOR FLOW CHART
 Decision symbol:
 Represented by diamond.
 Used to check the conditions whether true or false.
 Depending upon the condition, the program branches into direction.
 Process symbol:
 Represented by rectangle.
 Indicates any processing, operation, calculation etc.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 9
SYMBOLS USED FOR FLOW CHART
 Connector symbol:
 Represented using a circle.
 Brings together two branches of a program.
 Connects various pages of long flow charts.
 Predefined Process symbol:
 Represented using process symbol ( rectangle with two lines one on left and one on right side).
 Indicates a module of a program already defined by another flow chart.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 10
SYMBOLS USED FOR FLOW CHART
 Document symbol:
 Represented by document symbol.
 Used to represent any document on paper.
 Data flow symbol:
 Represented by arrows.
 Indicates the flow of operation.
 Also connects other symbols to one another.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 11
SYMBOLS USED FOR FLOW CHART
 Annotation symbol:
 Represented by open-ended box connected to the chart by dotted lines.
 Used for explanation or comments related to the program.
 Preparation:
 Represented by hexagon.
 Used to control, initiate or perform some other operation on the program itself.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 12
PSEUDOCODE
 Consists of short, English phrases used to explain specific tasks within a program.
 Is an informal high level description of the operating principle of a program or an algorithm.
 Should not include keywords in any specific computer language.
 Should be written as a list of consecutive phrases.
 allows the designer to focus on the logic of the algorithm without being distracted by details of
language syntax.
 describe the entire logic of the algorithm.
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 13
EXAMPLE OF PSEUDOCODE
 Write a pseudocode to find sum and average of given two numbers.
 Begin
 WRITE “Please enter two numbers to add”
 READ num1
 READ num2
 Sum = num1+num2
 Avg = Sum/2
 WRITE Sum, Avg
 End
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 14
THANKS !!!!!!!!
BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 15

More Related Content

What's hot

Chapter 2 Representation Of Algorithms 2
Chapter 2  Representation Of  Algorithms 2Chapter 2  Representation Of  Algorithms 2
Chapter 2 Representation Of Algorithms 2Li-Anne Serrano
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsSanay Kumar
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codeshermiraguilar
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programmingManoj Tyagi
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programmingTarun Sharma
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CPrabu U
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?Angela DeHart
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartsSamuel Igbanogu
 
Basic array in c programming
Basic array in c programmingBasic array in c programming
Basic array in c programmingSajid Hasan
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programmingprogramming9
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming LanguageSteve Johnson
 

What's hot (20)

Chapter 2 Representation Of Algorithms 2
Chapter 2  Representation Of  Algorithms 2Chapter 2  Representation Of  Algorithms 2
Chapter 2 Representation Of Algorithms 2
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
 
Introduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 FundamentalsIntroduction to Visual Basic 6.0 Fundamentals
Introduction to Visual Basic 6.0 Fundamentals
 
Pseudo code
Pseudo codePseudo code
Pseudo code
 
Introduction to problem solving in C
Introduction to problem solving in CIntroduction to problem solving in C
Introduction to problem solving in C
 
C# String
C# StringC# String
C# String
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
Flowchart
FlowchartFlowchart
Flowchart
 
Algorithms and Flowchart.ppt
Algorithms and Flowchart.pptAlgorithms and Flowchart.ppt
Algorithms and Flowchart.ppt
 
Problem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to CProblem Solving Techniques and Introduction to C
Problem Solving Techniques and Introduction to C
 
What is an algorithm?
What is an algorithm?What is an algorithm?
What is an algorithm?
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Basic array in c programming
Basic array in c programmingBasic array in c programming
Basic array in c programming
 
Constants in C Programming
Constants in C ProgrammingConstants in C Programming
Constants in C Programming
 
Learn c++ Programming Language
Learn c++ Programming LanguageLearn c++ Programming Language
Learn c++ Programming Language
 

Similar to Algorithms, flow charts and pseudocodes

final Unit 1-1.pdf
final Unit 1-1.pdffinal Unit 1-1.pdf
final Unit 1-1.pdfprakashvs7
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptxMaheShiva
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptReshuReshma8
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowchartsmoazwinner
 
detail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfdetail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfssuserf86fba
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Algorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTSAlgorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTS
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTSAlicia Edwards
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfSusieMaestre1
 
Flowchart design for algorithms
Flowchart design for algorithmsFlowchart design for algorithms
Flowchart design for algorithmsKuppusamy P
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithmmshoaib15
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer scienceumardanjumamaiwada
 
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.pptLecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.pptcosc242101003
 
Software develop....
Software develop.... Software develop....
Software develop.... GCWUS
 
Flowcharts and algorithms
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithmsStudent
 
Basic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chartBasic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chartPrasanna R Kovath
 
Programming process and flowchart
Programming process and flowchartProgramming process and flowchart
Programming process and flowcharthermiraguilar
 

Similar to Algorithms, flow charts and pseudocodes (20)

Chap6
Chap6Chap6
Chap6
 
final Unit 1-1.pdf
final Unit 1-1.pdffinal Unit 1-1.pdf
final Unit 1-1.pdf
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 
detail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdfdetail of flowchart and algorithm that are used in programmingpdf
detail of flowchart and algorithm that are used in programmingpdf
 
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
Algorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTSAlgorithm   Flowchart Manual ALGORITHM   FLOWCHART MANUAL For STUDENTS
Algorithm Flowchart Manual ALGORITHM FLOWCHART MANUAL For STUDENTS
 
Algorithm manual
Algorithm manualAlgorithm manual
Algorithm manual
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 
Flowchart design for algorithms
Flowchart design for algorithmsFlowchart design for algorithms
Flowchart design for algorithms
 
What is algorithm
What is algorithmWhat is algorithm
What is algorithm
 
lecture 5
 lecture 5 lecture 5
lecture 5
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.pptLecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
 
Software develop....
Software develop.... Software develop....
Software develop....
 
Flowcharts and algorithms
Flowcharts and algorithmsFlowcharts and algorithms
Flowcharts and algorithms
 
Basic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chartBasic syntax : Algorithm,Flow chart
Basic syntax : Algorithm,Flow chart
 
Fundamentals of-algorithm
Fundamentals of-algorithmFundamentals of-algorithm
Fundamentals of-algorithm
 
Flowcharting and Algorithm
Flowcharting and Algorithm Flowcharting and Algorithm
Flowcharting and Algorithm
 
Programming process and flowchart
Programming process and flowchartProgramming process and flowchart
Programming process and flowchart
 

More from Satveer Mann

Operators and expressons
Operators and expressonsOperators and expressons
Operators and expressonsSatveer Mann
 
keywords and identifiers
 keywords and identifiers keywords and identifiers
keywords and identifiersSatveer Mann
 
Preprocessor directives
Preprocessor directivesPreprocessor directives
Preprocessor directivesSatveer Mann
 
Program structure of c
Program structure of cProgram structure of c
Program structure of cSatveer Mann
 
Problem solving process
Problem solving processProblem solving process
Problem solving processSatveer Mann
 
Character set in C
Character set in CCharacter set in C
Character set in CSatveer Mann
 
Introduction to c
 Introduction to c Introduction to c
Introduction to cSatveer Mann
 

More from Satveer Mann (10)

Operators and expressons
Operators and expressonsOperators and expressons
Operators and expressons
 
Data types in C
Data types in CData types in C
Data types in C
 
Variables in C
Variables in CVariables in C
Variables in C
 
Constants in C
Constants in CConstants in C
Constants in C
 
keywords and identifiers
 keywords and identifiers keywords and identifiers
keywords and identifiers
 
Preprocessor directives
Preprocessor directivesPreprocessor directives
Preprocessor directives
 
Program structure of c
Program structure of cProgram structure of c
Program structure of c
 
Problem solving process
Problem solving processProblem solving process
Problem solving process
 
Character set in C
Character set in CCharacter set in C
Character set in C
 
Introduction to c
 Introduction to c Introduction to c
Introduction to c
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 

Algorithms, flow charts and pseudocodes

  • 1. ALGORITHM, PSEUDOCODE AND FLOW CHART BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 1
  • 2. ALGORITHM  A finite set of steps that specify a sequence of operations to be carried out in order to solve a specific problem.  It consists a set of explicit and clearly defined finite steps to carry out for a given set of initial conditions, produce the corresponding output and terminate after a fixed amount of time.  Tells the computer to solve the problem in a systematic way to get the desired output. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 2
  • 3. CHARACTERISTICS OR PROPERTIES OF ALGORITHMS  Finiteness- must terminate in finite number of steps.  Simplicity- Should be simple and easy to read.  Absence of Ambiguity- each step must be clear and unambiguous.  Feasibility- each step must be simple enough that it can be easily translated into the required language.  Completeness and correctness- must be complete and correct.  Input-These are zero or more values which are externally supplied to the algorithm.  Output-At least one value is produced. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 3
  • 4. STEPS TO WRITE ALGORITHM  Start the algorithm.  Take input from user.  Process the input data.  Produce one or more results after processing.  Show the result.  Exit the algorithm. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 4
  • 5. VERIFYING THE ALGORITHMS  To ensure the efficient execution of program, it is necessary to verify the algorithm before converting it into a computer program.  Different methods to verify are:  Dry run: find the value of each variable manually after every step.  Review: studying the logic and computing with a specification.  Walk through: presented to the team member for checking the efficiency. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 5
  • 6. EXAMPLE FOR AN ALGORITHM  Add two numbers.  Step 1: Start algorithm.  Step 2: Enter two numbers a, b.  Step 3: Compute c = a + b.  Step 4: Print c.  Step 5: Exit. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 6
  • 7. FLOW CHART  A pictorial representation of problem and algorithms to its solution that uses the symbols connected by flow lines.  Called flow chart because it charts the flow of program.  Used in expressing and understanding algorithms.  Useful for the programmer and system analyst. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 7
  • 8. SYMBOLS USED FOR FLOW CHART  The terminator symbol:  represented by rectangle by rounded ends.  Indicates the start and stop of the flow chart.  Input output symbol:  Represented by parallelogram.  Indicates input output operation. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 8
  • 9. SYMBOLS USED FOR FLOW CHART  Decision symbol:  Represented by diamond.  Used to check the conditions whether true or false.  Depending upon the condition, the program branches into direction.  Process symbol:  Represented by rectangle.  Indicates any processing, operation, calculation etc. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 9
  • 10. SYMBOLS USED FOR FLOW CHART  Connector symbol:  Represented using a circle.  Brings together two branches of a program.  Connects various pages of long flow charts.  Predefined Process symbol:  Represented using process symbol ( rectangle with two lines one on left and one on right side).  Indicates a module of a program already defined by another flow chart. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 10
  • 11. SYMBOLS USED FOR FLOW CHART  Document symbol:  Represented by document symbol.  Used to represent any document on paper.  Data flow symbol:  Represented by arrows.  Indicates the flow of operation.  Also connects other symbols to one another. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 11
  • 12. SYMBOLS USED FOR FLOW CHART  Annotation symbol:  Represented by open-ended box connected to the chart by dotted lines.  Used for explanation or comments related to the program.  Preparation:  Represented by hexagon.  Used to control, initiate or perform some other operation on the program itself. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 12
  • 13. PSEUDOCODE  Consists of short, English phrases used to explain specific tasks within a program.  Is an informal high level description of the operating principle of a program or an algorithm.  Should not include keywords in any specific computer language.  Should be written as a list of consecutive phrases.  allows the designer to focus on the logic of the algorithm without being distracted by details of language syntax.  describe the entire logic of the algorithm. BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 13
  • 14. EXAMPLE OF PSEUDOCODE  Write a pseudocode to find sum and average of given two numbers.  Begin  WRITE “Please enter two numbers to add”  READ num1  READ num2  Sum = num1+num2  Avg = Sum/2  WRITE Sum, Avg  End BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 14
  • 15. THANKS !!!!!!!! BY: SATVEER KAUR, ASSISTANT PROFESSOR, KHALSA COLLEGE, PATIALA 15