0% found this document useful (0 votes)
4 views38 pages

Q1 Lesson5 Flowchart

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
4 views38 pages

Q1 Lesson5 Flowchart

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 38

Flowchart

Flowchart
- is a graphical representation of an
algorithm. Programmers often use it as
a program-planning tool to solve a
problem. It makes use of symbols
which are connected among them to
indicate the flow of information and
processing.
START

Find the sum of two ENTER


1ST
numbers NUMBER

1.Enter the first number. ENTER


2.Enter the second 2ND
NUMBER
number.
3.Sum = 1st number + 2nd SUM = NUM1 +
NUM2
number
4.Print the sum
PRINT
SUM

END
Basic Symbols
used in
Flowchart
Designs
1. Terminal:
The oval symbol
indicates Start, Stop
and Halt in a
program’s logic flow.
Terminal is the first
and last symbols in
the flowchart.
2. Input/Output:
A parallelogram denotes
any function of
input/output type.
Program instructions
that take input from
input devices and
display output on output
devices are indicated
with parallelogram in a
flowchart.
3. Processing:
A box represents
arithmetic instructions.
All arithmetic
processes such as
adding, subtracting,
multiplication and
division are indicated
by action or process
symbol.
4. Decision
Diamond symbol
represents a decision
point. Decision based
operations such as
yes/no question or
true/false are indicated
by diamond in flowchart.
5. Connectors:
Whenever flowchart
becomes complex or it
spreads over more than
one page, it is useful to
use connectors to avoid
any confusions. It is
represented by a circle.
6. Flow lines:
Flow lines indicate the
exact sequence in
which instructions are
executed. Arrows
represent the
direction of flow of
control and
relationship among
different symbols of
flowchart.
START
Algorithm in logging
in to Facebook: Enter
email
1.Enter your email or
phone number. Enter
2.Enter your password. password

3.Is your email and


password correct? Is your
email and Y Log in
4.If yes, print log in
password
correct? Successful

successful. N
5.If no, print log in Log in
Failed
failed
END
Algorithm in checking if
your grade is passed or
failed.
1. Enter your grade.
2. Is your grade greater than or equal
to 75?
3. If yes, print the word “Passed”.
4. If no, print the word “Failed”.
Algorithm in checking if
the age is minor or legal
1. Enter your age.
2. Is your age greater than or equal
to 18?
3. If yes, print the word “Legal age”.
4. If no, print the word “Still a Minor”.
Algorithm in finding the
product of two
numbers.
1. Enter the first number
2. Enter the second number
3. Product = Num1 * Num2
4. Print the product
Algorithm in applying
for a scholarship
1. Enter your address
2. If address is Sta Rita, ask to enter
the average. If not from Sta Rita,
scholarship rejected.
3. After asking to input the average,
check if average is greater than or
equal to 90.
Algorithm in applying
for a scholarship
4. If average is less than 90,
scholarship rejected.
5. If average is 90 and above,
scholarship granted.
6. End
Quiz No. 4
Identify the flowchart symbol to use based
on the given steps below.
1. Enter your PIN.
2. Print the student’s name.
3. Compute the sum of 2 numbers.
4. Is your grade >= to 75?
5. End of the program.
Quiz No. 4
Identify the flowchart symbol to use based
on the given steps below.
6. Input your age.
7. Compute the average.
8. Display the result.
9. Are you qualified?
10. Start the program.
Quiz No. 4
Algorithm in withdrawing money from an
ATM.
1. Insert your card in the machine
2. Click/select Withdraw Money option.
3. Enter the amount to withdraw.
4. Enter your PIN
5. Is your PIN correct?
Quiz No. 4
If Yes, check if the balance is
enough. Go to Step 6.
If No, transaction failed
6. Is your balance enough?
If Yes, dispense the cash.
If No, transaction failed.
Techniques in creating a
flowchart
1. Determine the elements of the program
such as input, process, storage, logical,
and output.
2. Use appropriate symbols and arrowhead to
show the flow of the program.
3. All symbols of the flowchart are joined with
arrows.
Techniques in creating a
flowchart
4. Use easy words that can interpret even a
novice programmer.
5. Each symbol should fill in the order of
activities.
6. The execution of the flowchart is usually
from uppermost to bottommost.
7. All flowcharts start and end with terminals
symbol
Types of Flowchart
The following are two types of flowchart according to
use and application.
 System Flowchart – it defines the order of procedures
to do particular activity and the over-all flow of data
inside the system.
 Program Flowchart – also known as standard diagram.
Displays the movement of program to answer the
problems and create logical illustration of a program.
Three types of control structures:
1. Sequence – the steps
are positioned one
after another and the
demonstration of the
program is from
uppermost to
lowermost.
2. Branching (Selection or
Decision)- choosing
between two or more
alternative actions. It is
usually represented by the Questio
NO

“if-then” condition and n

answerable by true/false
and yes/no. In addition, it YES

is represented by the
diamond-shaped decision
box.
3. Loop (Repetition) - allows a statement
to be repeatedly executed until a
condition is met based on certain loop
condition.
EXERCISES:
1. Your favorite subject is Mathematics and
Basic Programming. You want to challenge
yourself on how you’re going to combine
the two subjects with one activity. Then
you suddenly think about finding the Area
and Perimeter of Square using flowchart.
Algorithm
Step 1: Start
Step 2: Enter Value of Length
Step 3: Area = Length x Length
Step 4: Perimeter = 4 x Length
Step 5: Show result of Area and
Perimeter
Step 6: End
2. Because of the pandemic also
known as Covid - 19 happening
around the world, a lot of people
are frightened with their health
condition. As a programmer you are
assigned to create a flowchart that
determines if a person has a fever
or in normal body temperature.
Algorithm
Step 1: Start
Step 2: Enter temperature
Step 3: Check: Is temperature less than
37.5 degrees?
Step 4: If Yes, print “You don’t have a
fever.
Step 5: If No, print “You have a fever”.
Step 6: End
3. A simple decision making flowchart of
waking up in the morning.
Step 1: Start
Step 2: Alarm rings
Step 3: Check: Ready to wake up?
If No, Will you be late? If No, Snooze 10
minutes then back to Step 2.
If No, Will you be late? If Yes, then
continue to Step 4.
If Yes, then continue to Step 4.
Step 4: Turn off alarm.
Step 5: Leave Bed.
Step 6: End

You might also like