SlideShare a Scribd company logo
1 of 34
Download to read offline
Introduction To
Flowcharting
Today’s Topics
• Flowchart Symbols
• Structures
•Sequence
•Selection
•Repetition
Flowchart:
Represents an algorithm
in graphical symbols
Terminal: Used to indicates the start and
end of a flowchart. Single flow line. Only
one “Start” and “Stop” terminal for each
program. The end terminal for
function/subroutine must use “Return”
instead of “Stop”.
Process: Used whenever data is being
manipulated. One flow line enters and
one flow line exits.
Input/Output: Used whenever data is
entered (input) or displayed (output).
One flow line enters and one flow line
exits.
Flowchart Symbols
Decision: Used to represent operations in which
there are two possible selections. One flow line
enters and two flow lines (labeled as “Yes” and
“No”) exit.
Function / Subroutine: Used to identify an
operation in a separate flowchart segment
(module). One flow line enters and one flow line
exits.
On-page Connector: Used to connect remote
flowchart portion on the same page. One flow line
enters and one flow line exits.
Off-page Connector: Used to connect remote
flowchart portion on different pages. One flow
line enters and one flow line exits.
Comment: Used to add descriptions or
clarification.
Flow line: Used to indicate the direction of flow of
control.
Flowchart Symbols
Comments or description
Start
Read N,
M
No
Yes
Stop
N = The number of students
M = The number of subjects
Connectors on the same page
Start
2
1
1 2
Stop
1- connection on the same
flowchart portion
2- connection on the different
flowchart portion
Connectors on a different page
Page 1 Page 2
Start
No
1
Yes 1
2
Stop
2
Function
Page 1
AVRG (result, n1, n2,n3)
Start
Stop
Read
n1, n2 , n3
Print
result
Page 2
AVRG ( result,n1, n2,n3)
Return
sum = n1+ n2+n3
result = sum/3
End terminal
must be a “Return”
Start terminal for a
Function is different.
Do not use “Start”
The detail of how the function works
is put in another flowchart.
This is known as Function-Definition
At this point,
we only focus on what
to do. How to do it,
it comes later.
This part is known as
Function-Call
Body of a function is
the same with
normal flowchart
This flowchart calculates the average of three numbers
The main flowcharting
structures
1.Sequence
2.Selection
3.Repetition
A flowchart expressing the solution to an involved
problem may have:
1. the main program flowchart on one page
2. with subprograms continuing the problem
solution on subsequent pages.
Each of the five acceptable structures
can be built from the basic elements as
shown below.
Each of the five acceptable structures
can be built from the basic elements as
shown below.
Each of the five acceptable structures
can be built from the basic elements as
shown below.
Sequence
In a computer program or an algorithm,
sequence involves simple steps which are
to be executed one after the other.
The steps are executed in the same order in which they are written.
In pseudocode,
sequence is expressed as:
process 1
process 2
…
…
process n
In a flowchart,
sequence is expressed as:
Sequence
An Example Using Sequence
Problem: Write a set of instructions that describe how to make a pot of tea.
Pseudocode
BEGIN
fill a kettle with water
boil the water in the kettle
put the tea leaves in the pot
pour boiling water in the pot
END
Flowchart
Binary Selection
In pseudocode, binary selection is
expressed in the following ways:
1. IF condition THEN
process 1
ENDIF
2. IF condition THEN
process 1
ELSE
process 2
ENDIF
Binary Selection
In flowcharts, binary selection is expressed in the
following ways:
Selection is used in a computer program or
algorithm
to determine which particular step or set of steps
is to be executed
Selection
Binary (structure)
Binary Selection
In pseudocode, binary
selection is expressed in the
following ways:
1. IF condition THEN
process 1
ENDIF
2. IF condition THEN
process 1
ELSE
process 2
ENDIF
Binary Selection
In flowcharts, binary selection is expressed in
the following ways:
Selection
Binary (flowchart structure)
Note: In a flowchart it is most important to indicate
1. which path is to be followed when the condition is true, and
2. which path to follow when the condition is false.
Without these indications the flowchart is open to more than one interpretation.
Note: There are two acceptable ways to represent a decision in all of the structures.
Either method is acceptable. For consistency, the method 1 is used throughout this document.
1. The condition is expressed as a
statement and the two possible
outcomes are indicated by
• True
• False
2. The condition is expressed as a
question and the two possible outcomes
are indicated by
• Yes
• No
Selection
Binary (examples)
Selection is used in a computer program or algorithm
to determine which particular step or set of steps is to be executed.
Examples Using Binary Selection
Problem 1: Write a set of instructions to describe when to answer the phone.
Binary Selection
Pseudocode
IF the telephone is ringing THEN
answer the telephone
ENDIF
Binary Selection
Flowchart
Selection
Binary (examples)
Examples Using Binary Selection
Problem 2: Write a set of instructions to follow when approaching a set of traffic
control lights.
Binary Selection
Pseudocode
IF the signal is green
THEN
proceed through the
intersection
ELSE
stop the vehicle
ENDIF
Binary Selection
Flowchart
Selection
Multi-way (structure)
Multi-way Selection
In pseudocode, multiple selection
is expressed as:
CASEWHERE expression
evaluates to
choice a : process a
choice b : process b
. .
. .
. .
OTHERWISE : default
process
ENDCASE
Note: As the flowchart version of
the multi-way selection indicates,
only one process on each pass is
executed as a result of the
implementation of the
Multi-way Selection
In flowcharts, multi-way selection is
expressed as:
Selection
Multi-way (examples)
Example Using Multi-way Selection
Problem: Write a set of instructions that describes how to:
respond to all possible signals at a set of traffic control lights.
Multi-way Selection
Pseudocode
CASEWHERE signal is
red : stop the
vehicle
amber : stop the
vehicle
green : proceed
through the intersection
OTHERWISE : proceed
with caution
ENDCASE
Multi-way Selection
Flowchart
Repetition
Repetition allows for a portion of an algorithm or computer program
to be done any number of times
dependent on some condition being met.
An occurrence of repetition is usually known as a loop.
An essential feature of repetition is that
each loop has a termination condition
to stop the repetition,
or the obvious outcome is that
the loop never completes execution (an infinite loop).
The termination condition can be checked or tested
1. at the beginning and is known as a pre-test loop or
2. at the end of the loop and is known as a post-test loop.
Repetition
Pre-test (structure)
Repetition: Pre-Test
A pre-tested loop is so named because the condition has to be met at
the very beginning of the loop or the body of the loop is not executed.
This construct is often called a guarded loop.
The body of the loop is executed repeatedly while the termination condition is true.
Repetition
In pseudocode, pre-test
repetition is expressed as:
WHILE condition is true
process(es)
ENDWHILE
Repetition
In flowcharting
pre-test repetition
is expressed as:
Repetition Post-test (structure)
Repetition: Post-Test
• A post-tested loop executes the body of the loop before testing the termination
condition.
• This construct is often referred to as an unguarded loop.
• The body of the loop is repeatedly executed until the termination condition is true.
An important difference between a pre-test and post-test loop is that the statements of a
post-test loop are executed at least once even if the condition is originally true, whereas the
body of the pre-test loop may never be executed if the termination condition is originally true.
A close look at the representations of the two loop types makes this point apparent.
Repetition
In pseudocode, post-test
repetition is expressed as:
REPEAT
process
UNTIL condition is true
Repetition
In a flowchart
post-test repetition
is expressed as:
Repetition Pre-test (example)
An Example Using Pre-Test Repetition
Problem: Determine a safety procedure for travelling in a carriage on a moving train.
Pre-test Repetition
Pseudocode
WHILE the train is moving
keep wholly within the
carriage
ENDWHILE
Pre-test Repetition
Flowchart
Repetition Post-test (example)
An Example Using Post-Test Repetition
Problem: Determine a procedure to beat egg whites until fluffy.
Post-test Repetition
Pseudocode
REPEAT
beat the egg whites
UNTIL fluffy
Post-test Repetition
Flowchart
Example:
Start
Stop
Read
Length,
Width
Print
Area,
Perimeter
Calculate Area
Area=Length * Width
Calculate Perimeter
Perimeter=
2 * (Width+Length)
Input:
Length <- 5
Width <- 3
Process:
Area = 5 * 3 = 15
Process:
Perimeter =
2* (5+3) = 16
Output
Area: 15
Perimeter: 16
Start
Stop
Read Num
Print
"Category A"
Yes
Num>0? No
Print
"Category B"
Example:
What is the output of the following flowchart when the input Num= 10
Num = 10
10 > 0 ? => YES
Input:
Num <- 10
Enter a Number >> 10
Output:
“Category A”
Category A
Start
Stop
Read Num
Print
"Category A"
Yes
Num>0? No
Print
"Category B"
Example:
What is the output of the following flowchart when the input is Num= 0
Num = 0
0 > 0 ? => NO
Output:
“Category B”
Input:
Num <- 0
Enter a Number >> 0
Category B
Output:
“Category A”
Category A
Start
Stop
Print
Result
Result=Result + Count
Count=Count - 1
Initialize
Result=0
Count=Num
Count>0?
Read Num
No
Print Count
Yes
Example:
What is the output of the following flowchart when the input is Num= 4
Input:
Num <- 4
Enter a Number => 4
Variables (in memory):
Num [ ]
Result [ ]
Count [ ]
Variables (in memory):
Num [ 4 ]
Result [ ]
Count [ ]
Count = 4
4 > 0 ? => YES
Variables (in memory):
Num [ 4 ]
Result [ 0 ]
Count [ 4 ]
Count: 4
Variables (in memory):
Num [ 4 ]
Result [ 4 ] 0 + 4
Count [ 3 ] 4 - 1
Count: 3
Count = 3
3 > 0 ? => YES
Variables (in memory):
Num [ 4 ]
Result [ 7 ] 4 + 3
Count [ 2 ] 3 - 1
Count: 2
Count = 2
2 > 0 ? => YES
Variables (in memory):
Num [ 4 ]
Result [ 9 ] 7 + 2
Count [ 1 ] 2 - 1
Count: 1
Count = 1
1 > 0 ? => YES
Variables (in memory):
Num [ 4 ]
Result [ 10] 9 + 1
Count [ 0 ] 1 - 1
Count: 0
Count = 0
0 > 0 ? => NO
Result: 10
Page 1
AVRG (average, 10, 5, N)
Start
Stop
Read
N
Print
average
Page 2
AVRG ( result,n1, n2,n3)
Return
sum = n1+ n2+n3
result = sum/3
Example:
What is the output of the following flowchart when the input is N = 6
average
10
5
N=6
Sum = 10 + 5 + 6
average =
21/3
Output:
Average: 7
T. O. L
Quiz
1. What is a flowchart?
2. It is used to connect remote flowchart
portion on the same page. One flow line
enters and one flow line exits.
3-5. Control Structures of Flowchart.

More Related Content

What's hot

Control structures i
Control structures i Control structures i
Control structures i Ahmad Idrees
 
Control Structures
Control StructuresControl Structures
Control StructuresGhaffar Khan
 
03 conditions loops
03   conditions loops03   conditions loops
03 conditions loopsManzoor ALam
 
Btech i pic u-3 handling input output and control statements
Btech i pic u-3 handling input output and control statementsBtech i pic u-3 handling input output and control statements
Btech i pic u-3 handling input output and control statementsRai University
 
Mca i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statementsMca i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statementsRai University
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programmingTejaswiB4
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniquesFincy V.J
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchartlotlot
 
Iaetsd march c algorithm for embedded memories in fpga
Iaetsd march c algorithm for embedded memories in fpgaIaetsd march c algorithm for embedded memories in fpga
Iaetsd march c algorithm for embedded memories in fpgaIaetsd Iaetsd
 

What's hot (15)

Fault simulation
Fault simulationFault simulation
Fault simulation
 
Control structures i
Control structures i Control structures i
Control structures i
 
Control Structures: Part 1
Control Structures: Part 1Control Structures: Part 1
Control Structures: Part 1
 
Control Structures
Control StructuresControl Structures
Control Structures
 
03 conditions loops
03   conditions loops03   conditions loops
03 conditions loops
 
Btech i pic u-3 handling input output and control statements
Btech i pic u-3 handling input output and control statementsBtech i pic u-3 handling input output and control statements
Btech i pic u-3 handling input output and control statements
 
Mca i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statementsMca i pic u-3 handling input output and control statements
Mca i pic u-3 handling input output and control statements
 
Basic structure of c programming
Basic structure of c programmingBasic structure of c programming
Basic structure of c programming
 
Programing techniques
Programing techniquesPrograming techniques
Programing techniques
 
New software testing-techniques
New software testing-techniquesNew software testing-techniques
New software testing-techniques
 
Ch1
Ch1Ch1
Ch1
 
Ifi7107 lesson4
Ifi7107 lesson4Ifi7107 lesson4
Ifi7107 lesson4
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
Iaetsd march c algorithm for embedded memories in fpga
Iaetsd march c algorithm for embedded memories in fpgaIaetsd march c algorithm for embedded memories in fpga
Iaetsd march c algorithm for embedded memories in fpga
 
java8
java8java8
java8
 

Similar to Flowcharting Guide: Introduction to Flowchart Symbols, Structures, Sequence, Selection, and Repetition

Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchartJordan Delacruz
 
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
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Shipra Swati
 
Chapter 3 - Flow of Control Part II.pdf
Chapter 3  - Flow of Control Part II.pdfChapter 3  - Flow of Control Part II.pdf
Chapter 3 - Flow of Control Part II.pdfKirubelWondwoson1
 
Software develop....
Software develop.... Software develop....
Software develop.... GCWUS
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.pptHirenderPal
 
Software Verification, Validation and Testing
Software Verification, Validation and TestingSoftware Verification, Validation and Testing
Software Verification, Validation and TestingDr Sukhpal Singh Gill
 
Algorithm defination, design & Implementation
Algorithm defination, design & ImplementationAlgorithm defination, design & Implementation
Algorithm defination, design & ImplementationBilal Maqbool ツ
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
Ecet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comEcet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comStephenson34
 
Ecet 360 Success Begins / snaptutorial.com
Ecet 360  Success Begins / snaptutorial.comEcet 360  Success Begins / snaptutorial.com
Ecet 360 Success Begins / snaptutorial.comWilliamsTaylorzl
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comHarrisGeorgx
 
etlplooping-170320213203.pptx
etlplooping-170320213203.pptxetlplooping-170320213203.pptx
etlplooping-170320213203.pptxffyuyufyfufufufu
 

Similar to Flowcharting Guide: Introduction to Flowchart Symbols, Structures, Sequence, Selection, and Repetition (20)

Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
 
Lect 3-4 Zaheer Abbas
Lect 3-4 Zaheer AbbasLect 3-4 Zaheer Abbas
Lect 3-4 Zaheer Abbas
 
Ch05
Ch05Ch05
Ch05
 
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
 
Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6Fundamental of Information Technology - UNIT 6
Fundamental of Information Technology - UNIT 6
 
Chapter 3 - Flow of Control Part II.pdf
Chapter 3  - Flow of Control Part II.pdfChapter 3  - Flow of Control Part II.pdf
Chapter 3 - Flow of Control Part II.pdf
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Software develop....
Software develop.... Software develop....
Software develop....
 
7-White Box Testing.ppt
7-White Box Testing.ppt7-White Box Testing.ppt
7-White Box Testing.ppt
 
Software Verification, Validation and Testing
Software Verification, Validation and TestingSoftware Verification, Validation and Testing
Software Verification, Validation and Testing
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
Algorithm defination, design & Implementation
Algorithm defination, design & ImplementationAlgorithm defination, design & Implementation
Algorithm defination, design & Implementation
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 
Ecet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.comEcet 360 Enthusiastic Study / snaptutorial.com
Ecet 360 Enthusiastic Study / snaptutorial.com
 
Ecet 360 Success Begins / snaptutorial.com
Ecet 360  Success Begins / snaptutorial.comEcet 360  Success Begins / snaptutorial.com
Ecet 360 Success Begins / snaptutorial.com
 
Ecet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.comEcet 360 Massive Success / snaptutorial.com
Ecet 360 Massive Success / snaptutorial.com
 
etlplooping-170320213203.pptx
etlplooping-170320213203.pptxetlplooping-170320213203.pptx
etlplooping-170320213203.pptx
 

More from VincentAcapen1

introduction to computes( Computer sytems servicing.ppt
introduction to computes( Computer sytems servicing.pptintroduction to computes( Computer sytems servicing.ppt
introduction to computes( Computer sytems servicing.pptVincentAcapen1
 
unit1lesson1definitionofatrend WEEK 1.pptx
unit1lesson1definitionofatrend WEEK 1.pptxunit1lesson1definitionofatrend WEEK 1.pptx
unit1lesson1definitionofatrend WEEK 1.pptxVincentAcapen1
 
Data-Collection-in-Qualitative-Research.pptx
Data-Collection-in-Qualitative-Research.pptxData-Collection-in-Qualitative-Research.pptx
Data-Collection-in-Qualitative-Research.pptxVincentAcapen1
 
Chapter 3_ Information Literacy.pdf
Chapter 3_ Information Literacy.pdfChapter 3_ Information Literacy.pdf
Chapter 3_ Information Literacy.pdfVincentAcapen1
 
Chapter 4 - Types of Media 1.pdf
Chapter 4 - Types of Media 1.pdfChapter 4 - Types of Media 1.pdf
Chapter 4 - Types of Media 1.pdfVincentAcapen1
 
Handling disclosure.2.ppt
Handling disclosure.2.pptHandling disclosure.2.ppt
Handling disclosure.2.pptVincentAcapen1
 

More from VincentAcapen1 (8)

introduction to computes( Computer sytems servicing.ppt
introduction to computes( Computer sytems servicing.pptintroduction to computes( Computer sytems servicing.ppt
introduction to computes( Computer sytems servicing.ppt
 
unit1lesson1definitionofatrend WEEK 1.pptx
unit1lesson1definitionofatrend WEEK 1.pptxunit1lesson1definitionofatrend WEEK 1.pptx
unit1lesson1definitionofatrend WEEK 1.pptx
 
MIL WEEK 1.docx
MIL WEEK 1.docxMIL WEEK 1.docx
MIL WEEK 1.docx
 
Data-Collection-in-Qualitative-Research.pptx
Data-Collection-in-Qualitative-Research.pptxData-Collection-in-Qualitative-Research.pptx
Data-Collection-in-Qualitative-Research.pptx
 
Chapter 3_ Information Literacy.pdf
Chapter 3_ Information Literacy.pdfChapter 3_ Information Literacy.pdf
Chapter 3_ Information Literacy.pdf
 
Chapter 4 - Types of Media 1.pdf
Chapter 4 - Types of Media 1.pdfChapter 4 - Types of Media 1.pdf
Chapter 4 - Types of Media 1.pdf
 
empowerment cot.pptx
empowerment cot.pptxempowerment cot.pptx
empowerment cot.pptx
 
Handling disclosure.2.ppt
Handling disclosure.2.pptHandling disclosure.2.ppt
Handling disclosure.2.ppt
 

Recently uploaded

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
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
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 

Recently uploaded (20)

POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
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
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
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🔝
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
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🔝
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
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
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 

Flowcharting Guide: Introduction to Flowchart Symbols, Structures, Sequence, Selection, and Repetition

  • 2. Today’s Topics • Flowchart Symbols • Structures •Sequence •Selection •Repetition
  • 4. Terminal: Used to indicates the start and end of a flowchart. Single flow line. Only one “Start” and “Stop” terminal for each program. The end terminal for function/subroutine must use “Return” instead of “Stop”. Process: Used whenever data is being manipulated. One flow line enters and one flow line exits. Input/Output: Used whenever data is entered (input) or displayed (output). One flow line enters and one flow line exits. Flowchart Symbols
  • 5. Decision: Used to represent operations in which there are two possible selections. One flow line enters and two flow lines (labeled as “Yes” and “No”) exit. Function / Subroutine: Used to identify an operation in a separate flowchart segment (module). One flow line enters and one flow line exits. On-page Connector: Used to connect remote flowchart portion on the same page. One flow line enters and one flow line exits. Off-page Connector: Used to connect remote flowchart portion on different pages. One flow line enters and one flow line exits. Comment: Used to add descriptions or clarification. Flow line: Used to indicate the direction of flow of control. Flowchart Symbols
  • 6. Comments or description Start Read N, M No Yes Stop N = The number of students M = The number of subjects
  • 7. Connectors on the same page Start 2 1 1 2 Stop 1- connection on the same flowchart portion 2- connection on the different flowchart portion
  • 8. Connectors on a different page Page 1 Page 2 Start No 1 Yes 1 2 Stop 2
  • 9. Function Page 1 AVRG (result, n1, n2,n3) Start Stop Read n1, n2 , n3 Print result Page 2 AVRG ( result,n1, n2,n3) Return sum = n1+ n2+n3 result = sum/3 End terminal must be a “Return” Start terminal for a Function is different. Do not use “Start” The detail of how the function works is put in another flowchart. This is known as Function-Definition At this point, we only focus on what to do. How to do it, it comes later. This part is known as Function-Call Body of a function is the same with normal flowchart This flowchart calculates the average of three numbers
  • 10. The main flowcharting structures 1.Sequence 2.Selection 3.Repetition A flowchart expressing the solution to an involved problem may have: 1. the main program flowchart on one page 2. with subprograms continuing the problem solution on subsequent pages.
  • 11. Each of the five acceptable structures can be built from the basic elements as shown below.
  • 12. Each of the five acceptable structures can be built from the basic elements as shown below.
  • 13. Each of the five acceptable structures can be built from the basic elements as shown below.
  • 14. Sequence In a computer program or an algorithm, sequence involves simple steps which are to be executed one after the other. The steps are executed in the same order in which they are written. In pseudocode, sequence is expressed as: process 1 process 2 … … process n In a flowchart, sequence is expressed as:
  • 15. Sequence An Example Using Sequence Problem: Write a set of instructions that describe how to make a pot of tea. Pseudocode BEGIN fill a kettle with water boil the water in the kettle put the tea leaves in the pot pour boiling water in the pot END Flowchart
  • 16. Binary Selection In pseudocode, binary selection is expressed in the following ways: 1. IF condition THEN process 1 ENDIF 2. IF condition THEN process 1 ELSE process 2 ENDIF Binary Selection In flowcharts, binary selection is expressed in the following ways: Selection is used in a computer program or algorithm to determine which particular step or set of steps is to be executed
  • 17. Selection Binary (structure) Binary Selection In pseudocode, binary selection is expressed in the following ways: 1. IF condition THEN process 1 ENDIF 2. IF condition THEN process 1 ELSE process 2 ENDIF Binary Selection In flowcharts, binary selection is expressed in the following ways:
  • 18. Selection Binary (flowchart structure) Note: In a flowchart it is most important to indicate 1. which path is to be followed when the condition is true, and 2. which path to follow when the condition is false. Without these indications the flowchart is open to more than one interpretation. Note: There are two acceptable ways to represent a decision in all of the structures. Either method is acceptable. For consistency, the method 1 is used throughout this document. 1. The condition is expressed as a statement and the two possible outcomes are indicated by • True • False 2. The condition is expressed as a question and the two possible outcomes are indicated by • Yes • No
  • 19. Selection Binary (examples) Selection is used in a computer program or algorithm to determine which particular step or set of steps is to be executed. Examples Using Binary Selection Problem 1: Write a set of instructions to describe when to answer the phone. Binary Selection Pseudocode IF the telephone is ringing THEN answer the telephone ENDIF Binary Selection Flowchart
  • 20. Selection Binary (examples) Examples Using Binary Selection Problem 2: Write a set of instructions to follow when approaching a set of traffic control lights. Binary Selection Pseudocode IF the signal is green THEN proceed through the intersection ELSE stop the vehicle ENDIF Binary Selection Flowchart
  • 21. Selection Multi-way (structure) Multi-way Selection In pseudocode, multiple selection is expressed as: CASEWHERE expression evaluates to choice a : process a choice b : process b . . . . . . OTHERWISE : default process ENDCASE Note: As the flowchart version of the multi-way selection indicates, only one process on each pass is executed as a result of the implementation of the Multi-way Selection In flowcharts, multi-way selection is expressed as:
  • 22. Selection Multi-way (examples) Example Using Multi-way Selection Problem: Write a set of instructions that describes how to: respond to all possible signals at a set of traffic control lights. Multi-way Selection Pseudocode CASEWHERE signal is red : stop the vehicle amber : stop the vehicle green : proceed through the intersection OTHERWISE : proceed with caution ENDCASE Multi-way Selection Flowchart
  • 23. Repetition Repetition allows for a portion of an algorithm or computer program to be done any number of times dependent on some condition being met. An occurrence of repetition is usually known as a loop. An essential feature of repetition is that each loop has a termination condition to stop the repetition, or the obvious outcome is that the loop never completes execution (an infinite loop). The termination condition can be checked or tested 1. at the beginning and is known as a pre-test loop or 2. at the end of the loop and is known as a post-test loop.
  • 24. Repetition Pre-test (structure) Repetition: Pre-Test A pre-tested loop is so named because the condition has to be met at the very beginning of the loop or the body of the loop is not executed. This construct is often called a guarded loop. The body of the loop is executed repeatedly while the termination condition is true. Repetition In pseudocode, pre-test repetition is expressed as: WHILE condition is true process(es) ENDWHILE Repetition In flowcharting pre-test repetition is expressed as:
  • 25. Repetition Post-test (structure) Repetition: Post-Test • A post-tested loop executes the body of the loop before testing the termination condition. • This construct is often referred to as an unguarded loop. • The body of the loop is repeatedly executed until the termination condition is true. An important difference between a pre-test and post-test loop is that the statements of a post-test loop are executed at least once even if the condition is originally true, whereas the body of the pre-test loop may never be executed if the termination condition is originally true. A close look at the representations of the two loop types makes this point apparent. Repetition In pseudocode, post-test repetition is expressed as: REPEAT process UNTIL condition is true Repetition In a flowchart post-test repetition is expressed as:
  • 26. Repetition Pre-test (example) An Example Using Pre-Test Repetition Problem: Determine a safety procedure for travelling in a carriage on a moving train. Pre-test Repetition Pseudocode WHILE the train is moving keep wholly within the carriage ENDWHILE Pre-test Repetition Flowchart
  • 27. Repetition Post-test (example) An Example Using Post-Test Repetition Problem: Determine a procedure to beat egg whites until fluffy. Post-test Repetition Pseudocode REPEAT beat the egg whites UNTIL fluffy Post-test Repetition Flowchart
  • 28. Example: Start Stop Read Length, Width Print Area, Perimeter Calculate Area Area=Length * Width Calculate Perimeter Perimeter= 2 * (Width+Length) Input: Length <- 5 Width <- 3 Process: Area = 5 * 3 = 15 Process: Perimeter = 2* (5+3) = 16 Output Area: 15 Perimeter: 16
  • 29. Start Stop Read Num Print "Category A" Yes Num>0? No Print "Category B" Example: What is the output of the following flowchart when the input Num= 10 Num = 10 10 > 0 ? => YES Input: Num <- 10 Enter a Number >> 10 Output: “Category A” Category A
  • 30. Start Stop Read Num Print "Category A" Yes Num>0? No Print "Category B" Example: What is the output of the following flowchart when the input is Num= 0 Num = 0 0 > 0 ? => NO Output: “Category B” Input: Num <- 0 Enter a Number >> 0 Category B Output: “Category A” Category A
  • 31. Start Stop Print Result Result=Result + Count Count=Count - 1 Initialize Result=0 Count=Num Count>0? Read Num No Print Count Yes Example: What is the output of the following flowchart when the input is Num= 4 Input: Num <- 4 Enter a Number => 4 Variables (in memory): Num [ ] Result [ ] Count [ ] Variables (in memory): Num [ 4 ] Result [ ] Count [ ] Count = 4 4 > 0 ? => YES Variables (in memory): Num [ 4 ] Result [ 0 ] Count [ 4 ] Count: 4 Variables (in memory): Num [ 4 ] Result [ 4 ] 0 + 4 Count [ 3 ] 4 - 1 Count: 3 Count = 3 3 > 0 ? => YES Variables (in memory): Num [ 4 ] Result [ 7 ] 4 + 3 Count [ 2 ] 3 - 1 Count: 2 Count = 2 2 > 0 ? => YES Variables (in memory): Num [ 4 ] Result [ 9 ] 7 + 2 Count [ 1 ] 2 - 1 Count: 1 Count = 1 1 > 0 ? => YES Variables (in memory): Num [ 4 ] Result [ 10] 9 + 1 Count [ 0 ] 1 - 1 Count: 0 Count = 0 0 > 0 ? => NO Result: 10
  • 32. Page 1 AVRG (average, 10, 5, N) Start Stop Read N Print average Page 2 AVRG ( result,n1, n2,n3) Return sum = n1+ n2+n3 result = sum/3 Example: What is the output of the following flowchart when the input is N = 6 average 10 5 N=6 Sum = 10 + 5 + 6 average = 21/3 Output: Average: 7
  • 34. Quiz 1. What is a flowchart? 2. It is used to connect remote flowchart portion on the same page. One flow line enters and one flow line exits. 3-5. Control Structures of Flowchart.