Page 1
Aim: In this lesson, you will learn:
How to draw a flowchart for problem solving.
Structures of a flowchart.
6. Flowcharts
Tejas: W e visited a computer exhibition for school students. W e saw a super computer, demonstration
of many uses of computer and many interesting applications.
Jyoti: In one of the stalls, we could enter any number as input and the computer was displaying the
multiplication table of the number. The picture shown above was used by the person at the stall,
to explain the sequence of steps followed by the computer, to display the table.
Jyoti: We observed that those who did not know about computers and programming could also
understand what was explained by the picture.
Moz: This picture is called a flowchart . One of the uses of flowchart is to describe the sequence
of steps and logic of solving a problem, before writing a computer program. Flowchart also helps
in communicating the steps of the solution to others.
Tejas: I see that various geometrical shapes are used in this representation. We are eager to learn
about flowcharts.
Moz: Let us start with a simple example. Look at the following flowchart of adding two natural
numbers A and B . Let us discuss the problem solution and the geometrical shapes used.
End
Start
NETWORKING
No
Add 1 to the current
value of count
Start
Read Number
N
Count = 1
Print N x Count
Yes
Stop
Is
Count = 10
Flowchart of multiplication table
for a given number N
Flowchart
for a
Page 2
Aim: In this lesson, you will learn:
How to draw a flowchart for problem solving.
Structures of a flowchart.
6. Flowcharts
Tejas: W e visited a computer exhibition for school students. W e saw a super computer, demonstration
of many uses of computer and many interesting applications.
Jyoti: In one of the stalls, we could enter any number as input and the computer was displaying the
multiplication table of the number. The picture shown above was used by the person at the stall,
to explain the sequence of steps followed by the computer, to display the table.
Jyoti: We observed that those who did not know about computers and programming could also
understand what was explained by the picture.
Moz: This picture is called a flowchart . One of the uses of flowchart is to describe the sequence
of steps and logic of solving a problem, before writing a computer program. Flowchart also helps
in communicating the steps of the solution to others.
Tejas: I see that various geometrical shapes are used in this representation. We are eager to learn
about flowcharts.
Moz: Let us start with a simple example. Look at the following flowchart of adding two natural
numbers A and B . Let us discuss the problem solution and the geometrical shapes used.
End
Start
NETWORKING
No
Add 1 to the current
value of count
Start
Read Number
N
Count = 1
Print N x Count
Yes
Stop
Is
Count = 10
Flowchart of multiplication table
for a given number N
Flowchart
for a
Jyoti: Start and also end of the flowchart are shown with an ellipse.
Moz: A flowchart should give a clear indication as to where the problem solving flow starts and
where it ends. The start of a problem solving process and the end are indicated using an ellipse.
Tejas: Our goal is addition of two given numbers. So, first we identify the data that is given.
In this problem we have the two numbers A and B. Reading the values are represented by
parallelograms.
Moz: Right. What would you call reading in values in computer terms?
Jyoti: Input.
Moz: The data or information that is available, (which is called input) is represented using a parallelogram
in the flowchart.
Moz: What is the next step?
Tejas: The next step is to add the numbers, which is called processing in computer terms. The details
of processing of data is represented in a rectangle.
Moz: Correct.
Jyoti: The next step is to write the result of the addition, which is output in computer terms. This
is also specified in a parallelogram.
Moz: Right. A parallelogram is used to specify both input and output in a flowchart. What else do
you notice in the flowchart?
Tejas: An arrow points from one step to the next step in the flowchart.
Moz: In a flowchart arrows are used to connect the steps in a sequence and show the flow of the
problem solving process.
Jyoti: W e learnt step by step thinking to solve a problem in Computer Masti- Level III. Using flowcharts
we can show the sequence of these steps.
Moz: Yes. The step by step method of solving the problem is specified using a flowchart. This
helps you to be clear about the input, processing and output. It also helps you to communicate
the solution.
Start
Finding sum of 845 and 247
A= 845
B= 247
Sum= 845+ 247
Sum= 1092
End
Start
End
Read A
Read B
Print Sum
Sum = A + B
Flowchart - How to find sum of two numbers
Page 3
Aim: In this lesson, you will learn:
How to draw a flowchart for problem solving.
Structures of a flowchart.
6. Flowcharts
Tejas: W e visited a computer exhibition for school students. W e saw a super computer, demonstration
of many uses of computer and many interesting applications.
Jyoti: In one of the stalls, we could enter any number as input and the computer was displaying the
multiplication table of the number. The picture shown above was used by the person at the stall,
to explain the sequence of steps followed by the computer, to display the table.
Jyoti: We observed that those who did not know about computers and programming could also
understand what was explained by the picture.
Moz: This picture is called a flowchart . One of the uses of flowchart is to describe the sequence
of steps and logic of solving a problem, before writing a computer program. Flowchart also helps
in communicating the steps of the solution to others.
Tejas: I see that various geometrical shapes are used in this representation. We are eager to learn
about flowcharts.
Moz: Let us start with a simple example. Look at the following flowchart of adding two natural
numbers A and B . Let us discuss the problem solution and the geometrical shapes used.
End
Start
NETWORKING
No
Add 1 to the current
value of count
Start
Read Number
N
Count = 1
Print N x Count
Yes
Stop
Is
Count = 10
Flowchart of multiplication table
for a given number N
Flowchart
for a
Jyoti: Start and also end of the flowchart are shown with an ellipse.
Moz: A flowchart should give a clear indication as to where the problem solving flow starts and
where it ends. The start of a problem solving process and the end are indicated using an ellipse.
Tejas: Our goal is addition of two given numbers. So, first we identify the data that is given.
In this problem we have the two numbers A and B. Reading the values are represented by
parallelograms.
Moz: Right. What would you call reading in values in computer terms?
Jyoti: Input.
Moz: The data or information that is available, (which is called input) is represented using a parallelogram
in the flowchart.
Moz: What is the next step?
Tejas: The next step is to add the numbers, which is called processing in computer terms. The details
of processing of data is represented in a rectangle.
Moz: Correct.
Jyoti: The next step is to write the result of the addition, which is output in computer terms. This
is also specified in a parallelogram.
Moz: Right. A parallelogram is used to specify both input and output in a flowchart. What else do
you notice in the flowchart?
Tejas: An arrow points from one step to the next step in the flowchart.
Moz: In a flowchart arrows are used to connect the steps in a sequence and show the flow of the
problem solving process.
Jyoti: W e learnt step by step thinking to solve a problem in Computer Masti- Level III. Using flowcharts
we can show the sequence of these steps.
Moz: Yes. The step by step method of solving the problem is specified using a flowchart. This
helps you to be clear about the input, processing and output. It also helps you to communicate
the solution.
Start
Finding sum of 845 and 247
A= 845
B= 247
Sum= 845+ 247
Sum= 1092
End
Start
End
Read A
Read B
Print Sum
Sum = A + B
Flowchart - How to find sum of two numbers
Moz: Now consider the following problem and draw the flowchart for its solution.
Savani bought a toy for ` 325 and sold the same for ` 458. Explain how we can find if
Savani has made a profit or a loss.
Tejas: In this problem the goal is to find whether Savani makes a profit or loss.
Jyoti: We know the Cost Price and the Selling Price. We can read them as input, so they are
represented as parallelograms.
Moz: You can also put both cost price and selling price in a single parallelogram.
Tejas: Next we have to compare Selling Price and Cost Price to find which price is more. This will
tell us whether Savani has made profit or loss. How do we show comparison in a flowchart?
Moz: Can you phrase this step as a question with the two possible answers?
Tejas: We can ask a question “Is selling price more than cost price?”
Moz: Right. The answer to this question can be “Yes” or “No”. If, answer is “Yes” we have to
calculate profit. If, answer is “no” we have to calculate loss. This decision taking step is represented
as a diamond in a flowchart.
• Identify input and output.
• Apply logical thinking skills to solve the problem.
• Draw the flowchart using the appropriate symbols and arrows to show the
sequence of steps in the solution.
Guidelines
Drawing a flowchart
Flowchart
Concept
What is a flowchart?
• A flowchart is a picture (graphical representation) of the problem
solving process.
• A flowchart gives a step-by-step procedure for solution of a
problem.
Elements of a flowchart:
• Various geometrical shaped boxes represent the steps of the
solution.
• The boxes are connected by directional arrows to show the
flow of the solution.
Uses of a flowchart:
• To specify the method of solving a problem.
• To plan the sequence of a computer program.
• Communicate ideas, solutions.
Read Cost price (CP)
Read Selling price (SP)
Read Cost price (CP)
Read Selling price (SP)
Next Step to be taken
when the answer is Yes.
Next Step to be taken
when the answer is No.
Yes
No
Question?
Page 4
Aim: In this lesson, you will learn:
How to draw a flowchart for problem solving.
Structures of a flowchart.
6. Flowcharts
Tejas: W e visited a computer exhibition for school students. W e saw a super computer, demonstration
of many uses of computer and many interesting applications.
Jyoti: In one of the stalls, we could enter any number as input and the computer was displaying the
multiplication table of the number. The picture shown above was used by the person at the stall,
to explain the sequence of steps followed by the computer, to display the table.
Jyoti: We observed that those who did not know about computers and programming could also
understand what was explained by the picture.
Moz: This picture is called a flowchart . One of the uses of flowchart is to describe the sequence
of steps and logic of solving a problem, before writing a computer program. Flowchart also helps
in communicating the steps of the solution to others.
Tejas: I see that various geometrical shapes are used in this representation. We are eager to learn
about flowcharts.
Moz: Let us start with a simple example. Look at the following flowchart of adding two natural
numbers A and B . Let us discuss the problem solution and the geometrical shapes used.
End
Start
NETWORKING
No
Add 1 to the current
value of count
Start
Read Number
N
Count = 1
Print N x Count
Yes
Stop
Is
Count = 10
Flowchart of multiplication table
for a given number N
Flowchart
for a
Jyoti: Start and also end of the flowchart are shown with an ellipse.
Moz: A flowchart should give a clear indication as to where the problem solving flow starts and
where it ends. The start of a problem solving process and the end are indicated using an ellipse.
Tejas: Our goal is addition of two given numbers. So, first we identify the data that is given.
In this problem we have the two numbers A and B. Reading the values are represented by
parallelograms.
Moz: Right. What would you call reading in values in computer terms?
Jyoti: Input.
Moz: The data or information that is available, (which is called input) is represented using a parallelogram
in the flowchart.
Moz: What is the next step?
Tejas: The next step is to add the numbers, which is called processing in computer terms. The details
of processing of data is represented in a rectangle.
Moz: Correct.
Jyoti: The next step is to write the result of the addition, which is output in computer terms. This
is also specified in a parallelogram.
Moz: Right. A parallelogram is used to specify both input and output in a flowchart. What else do
you notice in the flowchart?
Tejas: An arrow points from one step to the next step in the flowchart.
Moz: In a flowchart arrows are used to connect the steps in a sequence and show the flow of the
problem solving process.
Jyoti: W e learnt step by step thinking to solve a problem in Computer Masti- Level III. Using flowcharts
we can show the sequence of these steps.
Moz: Yes. The step by step method of solving the problem is specified using a flowchart. This
helps you to be clear about the input, processing and output. It also helps you to communicate
the solution.
Start
Finding sum of 845 and 247
A= 845
B= 247
Sum= 845+ 247
Sum= 1092
End
Start
End
Read A
Read B
Print Sum
Sum = A + B
Flowchart - How to find sum of two numbers
Moz: Now consider the following problem and draw the flowchart for its solution.
Savani bought a toy for ` 325 and sold the same for ` 458. Explain how we can find if
Savani has made a profit or a loss.
Tejas: In this problem the goal is to find whether Savani makes a profit or loss.
Jyoti: We know the Cost Price and the Selling Price. We can read them as input, so they are
represented as parallelograms.
Moz: You can also put both cost price and selling price in a single parallelogram.
Tejas: Next we have to compare Selling Price and Cost Price to find which price is more. This will
tell us whether Savani has made profit or loss. How do we show comparison in a flowchart?
Moz: Can you phrase this step as a question with the two possible answers?
Tejas: We can ask a question “Is selling price more than cost price?”
Moz: Right. The answer to this question can be “Yes” or “No”. If, answer is “Yes” we have to
calculate profit. If, answer is “no” we have to calculate loss. This decision taking step is represented
as a diamond in a flowchart.
• Identify input and output.
• Apply logical thinking skills to solve the problem.
• Draw the flowchart using the appropriate symbols and arrows to show the
sequence of steps in the solution.
Guidelines
Drawing a flowchart
Flowchart
Concept
What is a flowchart?
• A flowchart is a picture (graphical representation) of the problem
solving process.
• A flowchart gives a step-by-step procedure for solution of a
problem.
Elements of a flowchart:
• Various geometrical shaped boxes represent the steps of the
solution.
• The boxes are connected by directional arrows to show the
flow of the solution.
Uses of a flowchart:
• To specify the method of solving a problem.
• To plan the sequence of a computer program.
• Communicate ideas, solutions.
Read Cost price (CP)
Read Selling price (SP)
Read Cost price (CP)
Read Selling price (SP)
Next Step to be taken
when the answer is Yes.
Next Step to be taken
when the answer is No.
Yes
No
Question?
Jyoti: If the answer is “Yes”, it means that selling price is more than the cost price and Savani has
made profit. Profit is calculated as Selling price – Cost price.
Moz: Good. You have used logical reasoning to solve this problem. Now complete the flowchart.
Tejas: If the answer is “No”, it means that cost price is less than selling price and Savani has made
loss. Loss is calculated as Cost price – Selling price.
Flowchart - How to find profit or loss.
Finding profit or loss when
CP = 325 and SP = 458
Start
Read CP=325
Read SP= 458
Condition:
Is 458 > 325?
Profit= 458-325
Yes
End
Profit= Rs. 133
Profit = SP - CP
Is
SP > CP ?
Yes
No
Profit = SP - CP
Loss = CP - SP
Is
SP > CP ?
Yes
No
This is a
decision
structure.
This is a sequence.
Start
End
Read Cost price (CP)
Read Selling price (SP)
Print Profit Print Loss
Profit = SP - CP
Loss = CP - SP
Is
SP > CP ?
Yes
No
Page 5
Aim: In this lesson, you will learn:
How to draw a flowchart for problem solving.
Structures of a flowchart.
6. Flowcharts
Tejas: W e visited a computer exhibition for school students. W e saw a super computer, demonstration
of many uses of computer and many interesting applications.
Jyoti: In one of the stalls, we could enter any number as input and the computer was displaying the
multiplication table of the number. The picture shown above was used by the person at the stall,
to explain the sequence of steps followed by the computer, to display the table.
Jyoti: We observed that those who did not know about computers and programming could also
understand what was explained by the picture.
Moz: This picture is called a flowchart . One of the uses of flowchart is to describe the sequence
of steps and logic of solving a problem, before writing a computer program. Flowchart also helps
in communicating the steps of the solution to others.
Tejas: I see that various geometrical shapes are used in this representation. We are eager to learn
about flowcharts.
Moz: Let us start with a simple example. Look at the following flowchart of adding two natural
numbers A and B . Let us discuss the problem solution and the geometrical shapes used.
End
Start
NETWORKING
No
Add 1 to the current
value of count
Start
Read Number
N
Count = 1
Print N x Count
Yes
Stop
Is
Count = 10
Flowchart of multiplication table
for a given number N
Flowchart
for a
Jyoti: Start and also end of the flowchart are shown with an ellipse.
Moz: A flowchart should give a clear indication as to where the problem solving flow starts and
where it ends. The start of a problem solving process and the end are indicated using an ellipse.
Tejas: Our goal is addition of two given numbers. So, first we identify the data that is given.
In this problem we have the two numbers A and B. Reading the values are represented by
parallelograms.
Moz: Right. What would you call reading in values in computer terms?
Jyoti: Input.
Moz: The data or information that is available, (which is called input) is represented using a parallelogram
in the flowchart.
Moz: What is the next step?
Tejas: The next step is to add the numbers, which is called processing in computer terms. The details
of processing of data is represented in a rectangle.
Moz: Correct.
Jyoti: The next step is to write the result of the addition, which is output in computer terms. This
is also specified in a parallelogram.
Moz: Right. A parallelogram is used to specify both input and output in a flowchart. What else do
you notice in the flowchart?
Tejas: An arrow points from one step to the next step in the flowchart.
Moz: In a flowchart arrows are used to connect the steps in a sequence and show the flow of the
problem solving process.
Jyoti: W e learnt step by step thinking to solve a problem in Computer Masti- Level III. Using flowcharts
we can show the sequence of these steps.
Moz: Yes. The step by step method of solving the problem is specified using a flowchart. This
helps you to be clear about the input, processing and output. It also helps you to communicate
the solution.
Start
Finding sum of 845 and 247
A= 845
B= 247
Sum= 845+ 247
Sum= 1092
End
Start
End
Read A
Read B
Print Sum
Sum = A + B
Flowchart - How to find sum of two numbers
Moz: Now consider the following problem and draw the flowchart for its solution.
Savani bought a toy for ` 325 and sold the same for ` 458. Explain how we can find if
Savani has made a profit or a loss.
Tejas: In this problem the goal is to find whether Savani makes a profit or loss.
Jyoti: We know the Cost Price and the Selling Price. We can read them as input, so they are
represented as parallelograms.
Moz: You can also put both cost price and selling price in a single parallelogram.
Tejas: Next we have to compare Selling Price and Cost Price to find which price is more. This will
tell us whether Savani has made profit or loss. How do we show comparison in a flowchart?
Moz: Can you phrase this step as a question with the two possible answers?
Tejas: We can ask a question “Is selling price more than cost price?”
Moz: Right. The answer to this question can be “Yes” or “No”. If, answer is “Yes” we have to
calculate profit. If, answer is “no” we have to calculate loss. This decision taking step is represented
as a diamond in a flowchart.
• Identify input and output.
• Apply logical thinking skills to solve the problem.
• Draw the flowchart using the appropriate symbols and arrows to show the
sequence of steps in the solution.
Guidelines
Drawing a flowchart
Flowchart
Concept
What is a flowchart?
• A flowchart is a picture (graphical representation) of the problem
solving process.
• A flowchart gives a step-by-step procedure for solution of a
problem.
Elements of a flowchart:
• Various geometrical shaped boxes represent the steps of the
solution.
• The boxes are connected by directional arrows to show the
flow of the solution.
Uses of a flowchart:
• To specify the method of solving a problem.
• To plan the sequence of a computer program.
• Communicate ideas, solutions.
Read Cost price (CP)
Read Selling price (SP)
Read Cost price (CP)
Read Selling price (SP)
Next Step to be taken
when the answer is Yes.
Next Step to be taken
when the answer is No.
Yes
No
Question?
Jyoti: If the answer is “Yes”, it means that selling price is more than the cost price and Savani has
made profit. Profit is calculated as Selling price – Cost price.
Moz: Good. You have used logical reasoning to solve this problem. Now complete the flowchart.
Tejas: If the answer is “No”, it means that cost price is less than selling price and Savani has made
loss. Loss is calculated as Cost price – Selling price.
Flowchart - How to find profit or loss.
Finding profit or loss when
CP = 325 and SP = 458
Start
Read CP=325
Read SP= 458
Condition:
Is 458 > 325?
Profit= 458-325
Yes
End
Profit= Rs. 133
Profit = SP - CP
Is
SP > CP ?
Yes
No
Profit = SP - CP
Loss = CP - SP
Is
SP > CP ?
Yes
No
This is a
decision
structure.
This is a sequence.
Start
End
Read Cost price (CP)
Read Selling price (SP)
Print Profit Print Loss
Profit = SP - CP
Loss = CP - SP
Is
SP > CP ?
Yes
No
Info
Moz: Suppose you have to write a Scratch program using the flowchart that you have just drawn.
Can you do it now?
Tejas: Yes. We can!
Jyoti: This is great. We can also plan a computer program using flowcharts.
Jyoti: Sometimes we need to repeat a sequence. How do we represent this in the flowchart?
Moz: Let us consider the multiplication table flowchart that you saw at the exhibition. See how
repetition is represented in a flowchart. This is also called a loop.
Multiplication table of 12
Start
N = 12
Count =1
12 * 1 = 12
Count = 1+1 = 2
12 * 2 = 24
Count = 2+1 = 3
......
Count = 9+1 = 10
12 * 10 = 120
Count =10
End
Flowchart of multiplication table for a given number N
Flowchart symbols Geometric shape Purpose
Ellipse Ellipse is used to indicate the start and end of a flowchart.
Start written in the ellipse indicates the beginning of
a flowchart. End or Stop or Exit written in the ellipse
indicates the end of the flowchart.
Parallelogram A parallelogram is used to read data (input) or to print
data (output).
Rectangle A rectangle is used to show the processing that takes place
in the flowchart.
Diamond A diamond with two branches is used to show the decision
making step in a flowchart. A question is specified in the
diamond. The next step in the sequence is based on the
answer to the question which is “Yes” or “No”.
Arrows Arrows are used to connect the steps in a flowchart, to
show the flow or sequence of the problem solving process
Yes
No
Flowchart symbols and their purpose
Start of the
sequence to
be repeated.
Arrow
connects to
the start of the
sequence to be
repeated
Start
End
Read number N
Print count
times N = Multiple
Count = 1
Multiple = N x Count
Add 1 to
the current
value of count
Is
Count = 10
Yes
No
This is a loop.
Read More