0% found this document useful (0 votes)
12 views

Algorithm and Flowchart

Uploaded by

jostzy0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Algorithm and Flowchart

Uploaded by

jostzy0
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

9

SSP

Programming 1
Grade 9 – Special Science Program
Quarter 1
Programming
Module 4 – Week 6-72
Algorithm and Flowchart
Most Essential Learning Competency:
Demonstrate skills in the fundamentals of basic
programming techniques

Prepared by:
Noli A. Esmeña
Writer
Teacher I, Tayug National High School
Region I – SDO Pangasinan II
Programming 1 – Grade 9 (Special Science Program)
Alternative Delivery Mode
Module Writer: Noli A. Esmeña
Quarter 1 – Module 4, Week 6-7: Algorithm and Flowchart
First Edition, 2020

Republic Act 8293, section 176 states that: No copyright shall subsist in any
work of the Government of the Philippines. However, prior approval of the government
agency or office wherein the work is created shall be necessary for exploitation of such
work for profit. Such agency or office may, among other things, impose as a condition
the payment of royalties.
Borrowed materials (i.e., songs, stories, poems, pictures, photos, brand names,
trademarks, etc.) included in this module are owned by their respective copyright
holders. Every effort has been exerted to locate and seek permission to use these
materials from their respective copyright owners. The publisher and authors do not
represent nor claim ownership over them.

Published by the Department of Education


Secretary: Leonor Magtolis Briones
Undersecretary: Diosdado M. San Antonio

Printed in the Philippines by


Department of Education – Region I – Division of Pangasinan II
Office Address: Canarvacan, Binalonan, Pangasinan
E-mail Address: pangasinan2@deped.gov.ph

Reminders in using this module:

1. Use the module with care. Do not put unnecessary mark/s on any part of the
module. Use a separate sheet of paper in answering the exercises.
2. Don’t forget to answer What I Know before moving on to the other activities included
in the module.
3. Read the instruction carefully before doing each task.
4. Observe honesty and integrity in doing the tasks and checking your answers.
5. Finish the task at hand before proceeding to the next.
6. If you encounter any difficulty in answering the tasks in this module, do not hesitate
to consult your teacher or facilitator. Always bear in mind that you are not alone.
We hope that through this material, you will experience meaningful learning and
gain deep understanding of the relevant competencies. You can do it!

What I Need to Know

This module was designed and written with you in mind. It is here to help you
master the fundamentals of basic programming. The scope of this module
permits it to be used in many different learning situations. The language used
recognizes the diverse vocabulary level of students. The lessons are arranged to
follow the standard sequence of the course.
The module contains one (1) lesson namely:
• Lesson 1 – Algorithm and flowchart
After going through this module, you are expected to:
1. relate algorithm with flowcharts;
2. identify the flowcharting symbols; and
3. draw structured charts for simple programming problem solutions
What is It

Algorithm Defined
Algorithms are a set of steps used to complete a specific task. You have learned
from lesson 2 (the programming process) that before you code, compile, and debug
programs you will need first to identify the problem and then design a solution.
This is where algorithms come in. Thus, they can be considered as the basic
building blocks of programming.
Algorithms help computers, websites, smartphones, and others to function well
and to make decisions. But in addition to being used by technology, a lot of things
we do are similar to algorithms.
Let’s say you want to make some spaghetti. To do this successfully, there are
certain steps you need to follow in a particular order.
1. First, you need to boil water.
2. Once it’s boiling, you add the spaghetti and cook it for a set amount of time.
3. Once it’s finished, you drain the water then it’s ready to serve with the sauce
of your choice.
By following certain steps, you have accomplished a task, but a certain mistake of
following them (like overcooking the noodles) will also result in the failure of the
desired outcome. Programs work similarly. Their codes are made up of algorithms.
Don’t be confused between algorithms and programs; they are different
(GCFLearnFree.org, 2018).
Difference of Algorithm and Programs
Algorithm Programmer
• Written by a person who has • Written by programmers. To
domain knowledge about the program you should have
problem. For instance, you can’t knowledge of a programming
develop an algorithm for solving language and the programming
problems in geometry if you are process itself can have a program
not familiar with the field. satisfying the algorithm.
• It can be written in any language. • It can be written using a preferred
programming language.
• Pen and paper are enough to write • The use of a computer with
an algorithm. Hardware and programming software is required.
software are optional. Codes written on a sheet of paper
will stay as an algorithm unless
encoded on programming software.
(ITS InfoTechSkills, 2020a)
Let’s say you are about to make an algorithm. What are the characteristics of an
algorithm?
Characteristics of Algorithm
1. An algorithm can have zero to more input from a user.
2. An algorithm should have at least 1 output.
3. An algorithm must be very clear and realistic. A vague algorithm is hard to
transform into code.
4. An algorithm is finite and has an “end” point.
5. An algorithm must be useful, do not include details you don’t need, only the
essential ones.
(ITS InfoTechSkills, 2020b)

Flowcharts

You might have probably use flowcharts for you to visualize a process or a series of
steps, better. Similarly, flowcharts can also be used to represent the steps of an
algorithm. A flowchart, technically, contains different symbols that can represent
different operations of an algorithm.

Name Description Symbols


✓ Indicated by straight lines with
arrows to show the direction of
Flowchart data flow.
Lines ✓ It is used to connect blocks by
exiting from one and entering
another.

✓ Ovals or rounded rectangles are


Terminal
used to indicate the start and
Block
the end of an algorithm.

✓ They are used for


declaring/initializing variables
needed to solve a certain
Initialization process.
Block Declaration – stating a variable
name to be used
Initialization – to set a starting
value of a variable
✓ The rectangle indicates a
Process processing block, for such things
Block as calculations, opening and
closing files, and so forth.

Input/Output ✓ The parallelogram indicates


Block input and output operations.
✓ The diamond indicates a
decision. It has 1 entrance and 2
Decision exit points (TRUE and FALSE)
Block ✓ A condition is a question or
statement that gives you an
answer of T/F or Yes/No

✓ The circle is used as a


connection point between two
sections of a flowchart that are
Connectors not adjacent or closely located to
each other.
✓ They should be used as little as
possible.

(ITS InfoTechSkills, 2020c)

You might also like