SlideShare a Scribd company logo
Flowcharts and Pseudocode
-Piyush Charan
Assitant Professor
Deptt. Of electronics and Communication Engg.
Integral University, Lucknow
1
2
Problem Solving Tools
• Flowcharts
• Pseudocode
3
Programming Tools
• Three tools are used to convert
algorithms into computer programs:
• Flowchart - Graphically depicts the logical
steps to carry out a task and shows how the
steps relate to each other.
• Pseudocode - Uses English-like phrases with
some Visual Basic terms to outline the
program.
4
Problem solving example
• How many stamps do you use when
mailing a letter?
• One rule of thumb is to use one stamp
for every five sheets of paper or fraction
thereof.
5
Algorithm
1. Request the number of sheets of paper;
call it Sheets. (input)
2. Divide Sheets by 5. (processing)
3. Round the quotient up to the next
highest whole number; call it Stamps.
(processing)
4. Reply with the number Stamps. (output)
6
Flowcharts
• Graphically depict the logical steps to
carry out a task and show how the steps
relate to each other.
Basic Flowcharting Symbols
7
8
Flowchart symbols
9
Flowchart symbols continued
10
Flowchart
example
11
Pseudocode
• Uses English-like phrases to outline the
task.
12
Pseudocode example
Determine the proper number of stamps for a
letter
Read Sheets (input)
Set the number of stamps to Sheets / 5
(processing)
Round the number of stamps up to the next
whole number (processing)
Display the number of stamps (output)
13
Divide-and-conquer method
• Used in problem solving – take a large
problem and break it into smaller
problems solving the small ones first
• Breaks a problem down into modules
14
Statement structures
• Sequence – follow instructions from one line
to the next without skipping over any lines
• Decision - if the answer to a question is
“Yes” then one group of instructions is
executed. If the answer is “No,” then another
is executed
• Looping – a series of instructions are
executed over and over
15
Sequence
flow chart
16
Decision flow chart
17
Looping flow chart
18
Direction of Numbered NYC
Streets Algorithm
• Problem: A company XYZ plans to give
a 15% year-end bonus to each of its
employees earning Rs. 15,000 or more
per year, and fix a bonus of Rs. 2,000 to
all other employees. Draw a flow chart to
calculate total salary including bonus
• Discussion: Employees salary should
be accepted first.
19
Flowchart
20
Pseudocode
Program: Accept the employee salary
Get emp_salary
If emp_salary>=15000 Then
Display bonus=15% of emp_salary
tot_sal=emp_salary + bonus
Else
bonus=2000
tot_sal=emp_salary + bonus
End If
Display tot_sal
21
Class Average Algorithm
• Problem: Calculate and report the grade-point
average for a class
• Discussion: The average grade equals the
sum of all grades divided by the number of
students
Output: Average grade
Input: Student grades
Processing: Find the sum of the grades; count
the number of students; calculate average
22
Flowchart
23
Pseudocode
Program: Determine the average grade of a class
Initialize Counter and Sum to 0
Do While there are more data
Get the next Grade
Add the Grade to the Sum
Increment the Counter
Loop
Computer Average = Sum / Counter
Display Average
24
Tips and tricks of flowcharts
• Flowcharts are time-consuming to write and
difficult to update
• For this reason, professional programmers are
more likely to favor pseudocode and hierarchy
charts
• Because flowcharts so clearly illustrate the
logical flow of programming techniques, they
are a valuable tool in the education of
programmers
25
Tips and tricks of pseudocode
• There are many styles of pseudocode
• Some programmers use an outline form
• Some use a form that looks almost like a
programming language
• The pseudocode in the case studies of this text
focus on the primary tasks to be performed by
the program and leaves many of the routine
details to be completed during the coding
process

More Related Content

What's hot

Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchartlotlot
 
Pseudocode
PseudocodePseudocode
Pseudocode
Harsha Madushanka
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overview
agorolabs
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
Noel Malle
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
rajkumar1631010038
 
Pseudocode
PseudocodePseudocode
Pseudocode
grahamwell
 
Python programming introduction
Python programming introductionPython programming introduction
Python programming introduction
Siddique Ibrahim
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
fika sweety
 
The pseudocode
The pseudocodeThe pseudocode
The pseudocode
Asha Sari
 
Spreadsheet basics ppt
Spreadsheet basics pptSpreadsheet basics ppt
Spreadsheet basics ppt
Tammy Carter
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
Allen de Castro
 
Programming Fundamentals lecture 1
Programming Fundamentals lecture 1Programming Fundamentals lecture 1
Programming Fundamentals lecture 1
REHAN IJAZ
 
Pseudocode & flowchart examples
Pseudocode & flowchart examplesPseudocode & flowchart examples
Pseudocode & flowchart examples
hayrikk
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
Adam Mukharil Bachtiar
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
SabahtHussein
 
What is programming what are its benefits
What is programming  what are its benefits What is programming  what are its benefits
What is programming what are its benefits
Vijay Singh Khatri
 
Principles of programming
Principles of programmingPrinciples of programming
Principles of programming
Rob Paok
 
Chapter 13 programming languages and program development
Chapter 13   programming languages and program developmentChapter 13   programming languages and program development
Chapter 13 programming languages and program development
haider ali
 
Lecture 1 programming fundamentals (PF)
Lecture 1 programming fundamentals (PF)Lecture 1 programming fundamentals (PF)
Lecture 1 programming fundamentals (PF)
Kamran Zafar
 
How to download and install Python - lesson 2
How to download and install Python - lesson 2How to download and install Python - lesson 2
How to download and install Python - lesson 2
Shohel Rana
 

What's hot (20)

Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overview
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Unit 1-problem solving with algorithm
Unit 1-problem solving with algorithmUnit 1-problem solving with algorithm
Unit 1-problem solving with algorithm
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
Python programming introduction
Python programming introductionPython programming introduction
Python programming introduction
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
 
The pseudocode
The pseudocodeThe pseudocode
The pseudocode
 
Spreadsheet basics ppt
Spreadsheet basics pptSpreadsheet basics ppt
Spreadsheet basics ppt
 
Basic Computer Programming
Basic Computer ProgrammingBasic Computer Programming
Basic Computer Programming
 
Programming Fundamentals lecture 1
Programming Fundamentals lecture 1Programming Fundamentals lecture 1
Programming Fundamentals lecture 1
 
Pseudocode & flowchart examples
Pseudocode & flowchart examplesPseudocode & flowchart examples
Pseudocode & flowchart examples
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 
What is programming what are its benefits
What is programming  what are its benefits What is programming  what are its benefits
What is programming what are its benefits
 
Principles of programming
Principles of programmingPrinciples of programming
Principles of programming
 
Chapter 13 programming languages and program development
Chapter 13   programming languages and program developmentChapter 13   programming languages and program development
Chapter 13 programming languages and program development
 
Lecture 1 programming fundamentals (PF)
Lecture 1 programming fundamentals (PF)Lecture 1 programming fundamentals (PF)
Lecture 1 programming fundamentals (PF)
 
How to download and install Python - lesson 2
How to download and install Python - lesson 2How to download and install Python - lesson 2
How to download and install Python - lesson 2
 

Similar to Flowcharts and pseudocodes

Flowcharts (1)
Flowcharts (1)Flowcharts (1)
Flowcharts (1)
Emmanuel Alimpolos
 
2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx
ssuser4d77b2
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
Ahmad Idrees
 
Cse115 lecture03problemsolving
Cse115 lecture03problemsolvingCse115 lecture03problemsolving
Cse115 lecture03problemsolving
Md. Ashikur Rahman
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem
Frankie Jones
 
Pseudo code.pptx
Pseudo code.pptxPseudo code.pptx
Pseudo code.pptx
Chaya64047
 
Pj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentalsPj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentals
SasidharaRaoMarrapu
 
Lec-ProblemSolving.pptx
Lec-ProblemSolving.pptxLec-ProblemSolving.pptx
Lec-ProblemSolving.pptx
miansaad18
 
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.pptBCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
Kirti Verma
 
Qbasic notes
Qbasic notesQbasic notes
Qbasic notes
NasirRohail1
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 
Algorithm & Flowchart.pdf
Algorithm & Flowchart.pdfAlgorithm & Flowchart.pdf
Algorithm & Flowchart.pdf
Vpmv
 
DISE - Programming Concepts
DISE - Programming ConceptsDISE - Programming Concepts
DISE - Programming Concepts
Rasan Samarasinghe
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
SusieMaestre1
 
Lecture1
Lecture1Lecture1
Lecture1
Andrew Raj
 
algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
AmanPratik11
 
Flow charts week 5 2020 2021
Flow charts week 5 2020  2021Flow charts week 5 2020  2021
Flow charts week 5 2020 2021
Osama Ghandour Geris
 
Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++
Mohamed El Desouki
 

Similar to Flowcharts and pseudocodes (20)

Flowcharts
FlowchartsFlowcharts
Flowcharts
 
Flowcharts (1)
Flowcharts (1)Flowcharts (1)
Flowcharts (1)
 
Flowcharts
FlowchartsFlowcharts
Flowcharts
 
2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx2. Algorithms Representations (C++).pptx
2. Algorithms Representations (C++).pptx
 
C++ programming program design including data structures
C++ programming program design including data structures C++ programming program design including data structures
C++ programming program design including data structures
 
Cse115 lecture03problemsolving
Cse115 lecture03problemsolvingCse115 lecture03problemsolving
Cse115 lecture03problemsolving
 
2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem2.3 Apply the different types of algorithm to solve problem
2.3 Apply the different types of algorithm to solve problem
 
Pseudo code.pptx
Pseudo code.pptxPseudo code.pptx
Pseudo code.pptx
 
Pj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentalsPj01 1-computer and programming fundamentals
Pj01 1-computer and programming fundamentals
 
Lec-ProblemSolving.pptx
Lec-ProblemSolving.pptxLec-ProblemSolving.pptx
Lec-ProblemSolving.pptx
 
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.pptBCE L-2 Algorithms-and-Flowchart-ppt.ppt
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
 
Qbasic notes
Qbasic notesQbasic notes
Qbasic notes
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
Algorithm & Flowchart.pdf
Algorithm & Flowchart.pdfAlgorithm & Flowchart.pdf
Algorithm & Flowchart.pdf
 
DISE - Programming Concepts
DISE - Programming ConceptsDISE - Programming Concepts
DISE - Programming Concepts
 
AlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdfAlgorithmAndFlowChart.pdf
AlgorithmAndFlowChart.pdf
 
Lecture1
Lecture1Lecture1
Lecture1
 
algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
 
Flow charts week 5 2020 2021
Flow charts week 5 2020  2021Flow charts week 5 2020  2021
Flow charts week 5 2020 2021
 
Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++
 

More from Dr Piyush Charan

Unit 1- Intro to Wireless Standards.pdf
Unit 1- Intro to Wireless Standards.pdfUnit 1- Intro to Wireless Standards.pdf
Unit 1- Intro to Wireless Standards.pdf
Dr Piyush Charan
 
Unit 1 Solar Collectors
Unit 1 Solar CollectorsUnit 1 Solar Collectors
Unit 1 Solar Collectors
Dr Piyush Charan
 
Unit 5 Quantization
Unit 5 QuantizationUnit 5 Quantization
Unit 5 Quantization
Dr Piyush Charan
 
Unit 4 Lossy Coding Preliminaries
Unit 4 Lossy Coding PreliminariesUnit 4 Lossy Coding Preliminaries
Unit 4 Lossy Coding Preliminaries
Dr Piyush Charan
 
Unit 3 Geothermal Energy
Unit 3 Geothermal EnergyUnit 3 Geothermal Energy
Unit 3 Geothermal Energy
Dr Piyush Charan
 
Unit 2: Programming Language Tools
Unit 2:  Programming Language ToolsUnit 2:  Programming Language Tools
Unit 2: Programming Language Tools
Dr Piyush Charan
 
Unit 4 Arrays
Unit 4 ArraysUnit 4 Arrays
Unit 4 Arrays
Dr Piyush Charan
 
Unit 3 Lecture Notes on Programming
Unit 3 Lecture Notes on ProgrammingUnit 3 Lecture Notes on Programming
Unit 3 Lecture Notes on Programming
Dr Piyush Charan
 
Unit 3 introduction to programming
Unit 3 introduction to programmingUnit 3 introduction to programming
Unit 3 introduction to programming
Dr Piyush Charan
 
Forensics and wireless body area networks
Forensics and wireless body area networksForensics and wireless body area networks
Forensics and wireless body area networks
Dr Piyush Charan
 
Final PhD Defense Presentation
Final PhD Defense PresentationFinal PhD Defense Presentation
Final PhD Defense Presentation
Dr Piyush Charan
 
Unit 3 Arithmetic Coding
Unit 3 Arithmetic CodingUnit 3 Arithmetic Coding
Unit 3 Arithmetic Coding
Dr Piyush Charan
 
Unit 2 Lecture notes on Huffman coding
Unit 2 Lecture notes on Huffman codingUnit 2 Lecture notes on Huffman coding
Unit 2 Lecture notes on Huffman coding
Dr Piyush Charan
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
Dr Piyush Charan
 
Unit 3 Dictionary based Compression Techniques
Unit 3 Dictionary based Compression TechniquesUnit 3 Dictionary based Compression Techniques
Unit 3 Dictionary based Compression Techniques
Dr Piyush Charan
 
Unit 1 Introduction to Non-Conventional Energy Resources
Unit 1 Introduction to Non-Conventional Energy ResourcesUnit 1 Introduction to Non-Conventional Energy Resources
Unit 1 Introduction to Non-Conventional Energy Resources
Dr Piyush Charan
 
Unit 5-Operational Amplifiers and Electronic Measurement Devices
Unit 5-Operational Amplifiers and Electronic Measurement DevicesUnit 5-Operational Amplifiers and Electronic Measurement Devices
Unit 5-Operational Amplifiers and Electronic Measurement Devices
Dr Piyush Charan
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
Dr Piyush Charan
 
Unit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic GatesUnit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic Gates
Dr Piyush Charan
 
Unit 1 Numerical Problems on PN Junction Diode
Unit 1 Numerical Problems on PN Junction DiodeUnit 1 Numerical Problems on PN Junction Diode
Unit 1 Numerical Problems on PN Junction Diode
Dr Piyush Charan
 

More from Dr Piyush Charan (20)

Unit 1- Intro to Wireless Standards.pdf
Unit 1- Intro to Wireless Standards.pdfUnit 1- Intro to Wireless Standards.pdf
Unit 1- Intro to Wireless Standards.pdf
 
Unit 1 Solar Collectors
Unit 1 Solar CollectorsUnit 1 Solar Collectors
Unit 1 Solar Collectors
 
Unit 5 Quantization
Unit 5 QuantizationUnit 5 Quantization
Unit 5 Quantization
 
Unit 4 Lossy Coding Preliminaries
Unit 4 Lossy Coding PreliminariesUnit 4 Lossy Coding Preliminaries
Unit 4 Lossy Coding Preliminaries
 
Unit 3 Geothermal Energy
Unit 3 Geothermal EnergyUnit 3 Geothermal Energy
Unit 3 Geothermal Energy
 
Unit 2: Programming Language Tools
Unit 2:  Programming Language ToolsUnit 2:  Programming Language Tools
Unit 2: Programming Language Tools
 
Unit 4 Arrays
Unit 4 ArraysUnit 4 Arrays
Unit 4 Arrays
 
Unit 3 Lecture Notes on Programming
Unit 3 Lecture Notes on ProgrammingUnit 3 Lecture Notes on Programming
Unit 3 Lecture Notes on Programming
 
Unit 3 introduction to programming
Unit 3 introduction to programmingUnit 3 introduction to programming
Unit 3 introduction to programming
 
Forensics and wireless body area networks
Forensics and wireless body area networksForensics and wireless body area networks
Forensics and wireless body area networks
 
Final PhD Defense Presentation
Final PhD Defense PresentationFinal PhD Defense Presentation
Final PhD Defense Presentation
 
Unit 3 Arithmetic Coding
Unit 3 Arithmetic CodingUnit 3 Arithmetic Coding
Unit 3 Arithmetic Coding
 
Unit 2 Lecture notes on Huffman coding
Unit 2 Lecture notes on Huffman codingUnit 2 Lecture notes on Huffman coding
Unit 2 Lecture notes on Huffman coding
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
 
Unit 3 Dictionary based Compression Techniques
Unit 3 Dictionary based Compression TechniquesUnit 3 Dictionary based Compression Techniques
Unit 3 Dictionary based Compression Techniques
 
Unit 1 Introduction to Non-Conventional Energy Resources
Unit 1 Introduction to Non-Conventional Energy ResourcesUnit 1 Introduction to Non-Conventional Energy Resources
Unit 1 Introduction to Non-Conventional Energy Resources
 
Unit 5-Operational Amplifiers and Electronic Measurement Devices
Unit 5-Operational Amplifiers and Electronic Measurement DevicesUnit 5-Operational Amplifiers and Electronic Measurement Devices
Unit 5-Operational Amplifiers and Electronic Measurement Devices
 
Unit 1 Introduction to Data Compression
Unit 1 Introduction to Data CompressionUnit 1 Introduction to Data Compression
Unit 1 Introduction to Data Compression
 
Unit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic GatesUnit 4 Switching Theory and Logic Gates
Unit 4 Switching Theory and Logic Gates
 
Unit 1 Numerical Problems on PN Junction Diode
Unit 1 Numerical Problems on PN Junction DiodeUnit 1 Numerical Problems on PN Junction Diode
Unit 1 Numerical Problems on PN Junction Diode
 

Recently uploaded

Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 

Recently uploaded (20)

Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 

Flowcharts and pseudocodes

  • 1. Flowcharts and Pseudocode -Piyush Charan Assitant Professor Deptt. Of electronics and Communication Engg. Integral University, Lucknow 1
  • 2. 2 Problem Solving Tools • Flowcharts • Pseudocode
  • 3. 3 Programming Tools • Three tools are used to convert algorithms into computer programs: • Flowchart - Graphically depicts the logical steps to carry out a task and shows how the steps relate to each other. • Pseudocode - Uses English-like phrases with some Visual Basic terms to outline the program.
  • 4. 4 Problem solving example • How many stamps do you use when mailing a letter? • One rule of thumb is to use one stamp for every five sheets of paper or fraction thereof.
  • 5. 5 Algorithm 1. Request the number of sheets of paper; call it Sheets. (input) 2. Divide Sheets by 5. (processing) 3. Round the quotient up to the next highest whole number; call it Stamps. (processing) 4. Reply with the number Stamps. (output)
  • 6. 6 Flowcharts • Graphically depict the logical steps to carry out a task and show how the steps relate to each other.
  • 11. 11 Pseudocode • Uses English-like phrases to outline the task.
  • 12. 12 Pseudocode example Determine the proper number of stamps for a letter Read Sheets (input) Set the number of stamps to Sheets / 5 (processing) Round the number of stamps up to the next whole number (processing) Display the number of stamps (output)
  • 13. 13 Divide-and-conquer method • Used in problem solving – take a large problem and break it into smaller problems solving the small ones first • Breaks a problem down into modules
  • 14. 14 Statement structures • Sequence – follow instructions from one line to the next without skipping over any lines • Decision - if the answer to a question is “Yes” then one group of instructions is executed. If the answer is “No,” then another is executed • Looping – a series of instructions are executed over and over
  • 18. 18 Direction of Numbered NYC Streets Algorithm • Problem: A company XYZ plans to give a 15% year-end bonus to each of its employees earning Rs. 15,000 or more per year, and fix a bonus of Rs. 2,000 to all other employees. Draw a flow chart to calculate total salary including bonus • Discussion: Employees salary should be accepted first.
  • 20. 20 Pseudocode Program: Accept the employee salary Get emp_salary If emp_salary>=15000 Then Display bonus=15% of emp_salary tot_sal=emp_salary + bonus Else bonus=2000 tot_sal=emp_salary + bonus End If Display tot_sal
  • 21. 21 Class Average Algorithm • Problem: Calculate and report the grade-point average for a class • Discussion: The average grade equals the sum of all grades divided by the number of students Output: Average grade Input: Student grades Processing: Find the sum of the grades; count the number of students; calculate average
  • 23. 23 Pseudocode Program: Determine the average grade of a class Initialize Counter and Sum to 0 Do While there are more data Get the next Grade Add the Grade to the Sum Increment the Counter Loop Computer Average = Sum / Counter Display Average
  • 24. 24 Tips and tricks of flowcharts • Flowcharts are time-consuming to write and difficult to update • For this reason, professional programmers are more likely to favor pseudocode and hierarchy charts • Because flowcharts so clearly illustrate the logical flow of programming techniques, they are a valuable tool in the education of programmers
  • 25. 25 Tips and tricks of pseudocode • There are many styles of pseudocode • Some programmers use an outline form • Some use a form that looks almost like a programming language • The pseudocode in the case studies of this text focus on the primary tasks to be performed by the program and leaves many of the routine details to be completed during the coding process