SlideShare a Scribd company logo
1 of 32
Download to read offline
TUNASAN NATIONAL HIGH SCHOOL
SDO - Muntinlupa City
ROWELL L. MARQUINA
Senior High School Teacher
TUNASAN NATIONAL HIGH SCHOOL
Lesson 1 - Java Programming
WHAT IS AN ALGORITHM?
An algorithm refers to a series of
well-defined instructions on how to
accomplish a task or solve a specific
problem.
▪ Giving directions on how to get to
somebody’s house is an algorithm.
▪ Following a recipe for baking a cake is
an algorithm.
▪ The steps to compute the for average
is also an algorithm.
IMAGE SOURCE:
https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png
https://www.flaticon.com/free-icon/coding_1085774
STEPS IN CREATING AN ALGORITHM
In creating an algorithm, it is very
important to determine the exact goal
or expected product first.
The goal or expected product of the
algorithm is called OUTPUT.
IMAGE SOURCE:
https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png
https://www.flaticon.com/free-icon/coding_1085774
STEPS IN CREATING AN ALGORITHM
After determining the output, the next
step is to identify the necessary
materials or elements needed to
accomplish the task.
The necessary materials or elements
for the program is called INPUT.
IMAGE SOURCE:
https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png
https://www.flaticon.com/free-icon/coding_1085774
STEPS IN CREATING AN ALGORITHM
If the input and output are already
identified, it is time to list the steps
needed to accomplish the task.
The steps needed to accomplish the
task is referred to as the PROCESS.
IMAGE SOURCE:
https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png
https://www.flaticon.com/free-icon/coding_1085774
CHARACTERISTICS OF AN ALGORITHM
▪ It should have well-defined input and output.
▪ The steps should be stated clearly and
unambiguously.
▪ It should have an exact start and end.
▪ It should be simple but precise.
▪ It should be practical.
IMAGE SOURCE:
https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png
https://www.flaticon.com/free-icon/coding_1085774
WHAT IS A FLOWCHART?
A flowchart is a diagram that
illustrates a process, system
or computer algorithm.
IMAGE SOURCE:
https://www.frevvo.com/blog/wp-content/uploads/2021/10/image5-2.png
Flowcharts are widely used in
multiple fields to document,
study, plan, improve and
communicate often complex
processes in clear, easy-to-
understand diagrams.
FLOWCHART SYMBOLS
The American National
Standards Institute (ANSI) set
standards for flowcharts and
their symbols in the 1960s.
IMAGE SOURCE:
https://uploads-ssl.webflow.com/6184b461a39ff13bfb8c0556/61de99e8171cc6468145551d_flowchart-symbols-800.png
In 1970 the International
Organization for
Standardization (ISO)
adopted the ANSI symbols as
the international standard for
developing flowcharts.
FLOWCHART SYMBOLS
IMAGE SOURCE:
https://uploads-ssl.webflow.com/6184b461a39ff13bfb8c0556/61de99e8171cc6468145551d_flowchart-symbols-800.png
NAME OF
SYMBOL
SYMBOL FUNCTION
Terminal Symbol
Indicates the beginning and end of the
flowchart.
Flowline Symbol
Its shows the process’ direction or the
next steps in the process.
Process Symbol
It shows the process or operations to
be carried out by the program
Decision Symbol
It shows the step that contains a
control mechanism or decision.
Input/Output
Symbol
It indicates the process of getting data
from the user or displaying data on
screen.
FLOWCHART PROBLEM 1:
DETERMINING USER’S AGE:
Create a flowchart for a program
that will require the user to input
their year of birth. Using the user’s
year of birth, the program will
compute for the user’s age and
display its result on the computer
screen.
FLOWCHART SAMPLE
1:
START
birthyear, age
display
“Enter Year of Birth:”
input
birthyear
age = 2023 - birthyear
display
age
END
The program is initiated.
The variables birthyear and age are introduced to the program as integers.
The program displays the instruction “Enter Year of Birth: ” on screen .
The program get an input from the user and store its value in the variable birthyear.
The program computes for the value of age using the formula age = 2023 - birthyear.
The program displays the value of age on the screen.
The program is terminated.
FLOWCHART PROBLEM 2:
CONVERSION FROM
KILOGRAM TO POUND:
Create a flowchart for a program
that will require the user to input
a value in kilogram (kg). The
program will convert the inputted
value into pounds (lbs.) and
display its results on the screen.
FLOWCHART SAMPLE
1:
START
kilo, pound
display
“Enter Weight in
Kilogram:”
input
kilo
pound = kilo * 2.2
display
pound
END
The program is initiated.
The variables kilo and pound are introduced to the program.
The program displays the instruction “Enter Weight in Kilogram:” on screen.
The program get an input from the user and store its value in the variable kilo.
The program computes for the value of pound using the formula pound = kilo*2.2.
The program displays the value of pound on the screen.
The program is terminated.
FLOWCHART PROBLEM 3:
COMPUTING FOR AREA:
Create a flowchart for a program
that will require the user to input
the length and width of a
rectangle. The program will
compute for the area of the
rectangle using the inputted
length and with and display its
results on the screen.
FLOWCHART SAMPLE
1:
START
length, width, area
display
“Enter Length of the
Rectangle:”
input
length
display
“Enter Width of the
Rectangle:”
input
width
A
The program is initiated.
The variables length, width, and area are introduced to the program as integers.
The program displays the instruction “Enter Length of Rectangle: ” on screen .
The program get an input from the user and store its value in the variable length.
The program displays the instruction “Enter Width of Rectangle: ” on screen .
The program get an input from the user and store its value in the width.
The program will continue on the next part.
FLOWCHART SAMPLE
1:
A
area = length * width
display
area
END
The program continues.
The program computes for the value of area using the formula area = length*width.
The program displays the value of area on the screen.
The program is terminated.
FLOWCHART PROBLEM 4:
PLAYING WITH NUMBERS:
Create a flowchart for a program
that will require the user to input
four numbers. Using the inputs, the
program will compute for:
▪ the sum of 1st and 2nd number,
▪ the product of the 3rd and 4th number
▪ the square of the 2nd number
FLOWCHART SAMPLE
1:
START
a, b, c, d, sum, product, square
display
“Enter the First
Number:”
input
a
display
“Enter the Second
Number:”
input
b
A
The program is initiated.
The variables a, b, c, d, sum, product, and square are introduced to the program.
The program displays the instruction “Enter the First Number: ” on screen .
The program get an input from the user and store its value in the variable a.
The program displays the instruction “Enter the Second Number: ” on screen .
The program get an input from the user and store its value in the b.
The program will continue on the next part.
FLOWCHART SAMPLE
1: display
“Enter the Third
Number:”
input
c
display
“Enter the Fourth
Number:”
input
d
B
The program continues.
The program displays the instruction “Enter the Third Number: ” on screen .
The program get an input from the user and store its value in the variable c.
The program displays the instruction “Enter the Fourth Number: ” on screen .
The program get an input from the user and store its value in the d.
The program will continue on the next part.
A
FLOWCHART SAMPLE
1:
B
sum = a + b
The program continues.
The program computes for the value of sum using the formula sum = a + b.
product = c * d The program computes for the value of product using the formula product = c*d.
square = b * b The program computes for the value of square using the formula square = b*b.
display
sum
The program displays the value of sum on the screen.
display
product
The program displays the value of product on the screen.
display
square
The program displays the value of square on the screen.
END The program is terminated.
FLOWCHART PROBLEM 5:
PLAYING WITH NUMBERS:
Create a flowchart for a program
that will require the user to input
four numbers. Using the inputs, the
program will compute for:
▪ the cube of the 1st number,
▪ the half of the 2nd number,
▪ the 20% of the 3rd number,
▪ The product of multiplying the 4th
number by 100
FLOWCHART SAMPLE
1:
START
display
“Enter the First
Number:”
input
a
display
“Enter the Second
Number:”
input
b
A
The program is initiated.
The variables a, b, c, d, cube, half, twentypercent, and times100 are
introduced to the program.
The program displays the instruction “Enter the First Number: ” on screen .
The program get an input from the user and store its value in the variable a.
The program displays the instruction “Enter the Second Number: ” on screen .
The program get an input from the user and store its value in the b.
The program will continue on the next part.
a, b, c, d, cube, half,
twentypercent, times100
FLOWCHART SAMPLE
1: display
“Enter the Third
Number:”
input
c
display
“Enter the Fourth
Number:”
input
d
B
The program continues.
The program displays the instruction “Enter the Third Number: ” on screen .
The program get an input from the user and store its value in the variable c.
The program displays the instruction “Enter the Fourth Number: ” on screen .
The program get an input from the user and store its value in the d.
The program will continue on the next part.
A
FLOWCHART SAMPLE
1:
B
cube = a*a*a
The program continues.
The program computes for the value of cube using the formula cube = a*a*a.
half = b / 2 The program computes for the value of half using the formula half = b / 2.
twentypercent = c * 0.20
The program computes for the value of twentypercent using the formula
twentypercent = c*0.20.
times100 = d * 100 The program computes for the value of times100 using the formula times100 = d*100.
display
cube
The program displays the value of cube on the screen.
display
half
The program displays the value of half on the screen.
C The program will continue on the next part.
FLOWCHART SAMPLE
1: C The program continues.
display
twentypercent
The program displays the value of twentypercent on the screen.
display
times100
The program displays the value of times100 on the screen.
END The program is terminated.
PRACTICE TEST 1:
DOLLAR TO PESO CONVERSION:
Create a flowchart for a program that
will require the user to input the
amount in US Dollars. Using the
inputted amount, the program will
convert it to its Philippine Peso value
and display the answer on the screen.
Note:
1 US Dollar = Php 56.78
PRACTICE TEST 2:
COMPUTING FOR AVERAGE
Create a flowchart for a program
that will require the user to input
their grades in Mathematics, English,
and Science. The program will
compute for the average of the three
grades and display its result on the
computer screen.
PRACTICE TEST 3:
PLAYING WITH NUMBERS:
Create a flowchart for a program that will
require the user to input four numbers. Using
the inputs, the program will perform the
following:
▪ display the 1st number,
▪ get the product of 1st and 3rd number,
▪ get the product of multiplying the 2nd
number by the sum of the 3rd and 4th
number,
▪ the average of the four numbers increased
by 5.
ALGORITHM AND FLOWCHARTING
MR. ROWELL L. MARQUINA
Tunasan National High School
Senior High School Department
Email Address:
rowell.marquina001@deped.gov.ph
sirrowellmarquina@gmail.com
rmarquina@mitis.edu.ph

More Related Content

What's hot

Chapter 13 - Recursion
Chapter 13 - RecursionChapter 13 - Recursion
Chapter 13 - Recursion
Adan Hubahib
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
pm2214
 
Java Methods
Java MethodsJava Methods
Java Methods
OXUS 20
 
Variable, constant, operators and control statement
Variable, constant, operators and control statementVariable, constant, operators and control statement
Variable, constant, operators and control statement
Eyelean xilef
 

What's hot (20)

Chapter 13 - Recursion
Chapter 13 - RecursionChapter 13 - Recursion
Chapter 13 - Recursion
 
Java Presentation
Java PresentationJava Presentation
Java Presentation
 
Java
JavaJava
Java
 
JAVA FEATURES
JAVA FEATURESJAVA FEATURES
JAVA FEATURES
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Preprocessors
Preprocessors Preprocessors
Preprocessors
 
Introduction to Flowchart
Introduction to FlowchartIntroduction to Flowchart
Introduction to Flowchart
 
Java Methods
Java MethodsJava Methods
Java Methods
 
History of c++
History of c++ History of c++
History of c++
 
Flowchart and algorithem
Flowchart and algorithemFlowchart and algorithem
Flowchart and algorithem
 
java Features
java Featuresjava Features
java Features
 
Introduction to Java Programming
Introduction to Java ProgrammingIntroduction to Java Programming
Introduction to Java Programming
 
Algorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodesAlgorithms, flow charts and pseudocodes
Algorithms, flow charts and pseudocodes
 
Java Programming
Java ProgrammingJava Programming
Java Programming
 
Visual Basic 6.0
Visual Basic 6.0Visual Basic 6.0
Visual Basic 6.0
 
Java buzzwords.pptx
Java buzzwords.pptxJava buzzwords.pptx
Java buzzwords.pptx
 
Variable, constant, operators and control statement
Variable, constant, operators and control statementVariable, constant, operators and control statement
Variable, constant, operators and control statement
 
Friend function in c++
Friend function in c++ Friend function in c++
Friend function in c++
 
Inheritance in java
Inheritance in javaInheritance in java
Inheritance in java
 
Access modifiers in java
Access modifiers in javaAccess modifiers in java
Access modifiers in java
 

Similar to Lesson 1 - Algorithm and Flowcharting.pdf

California State University, Fullerton College of Engineerin.docx
California State University, Fullerton College of Engineerin.docxCalifornia State University, Fullerton College of Engineerin.docx
California State University, Fullerton College of Engineerin.docx
humphrieskalyn
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
Prabhu D
 
Cis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry universityCis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry university
sjskjd709707
 
ICT104 Programming Assignment Compiled By Divya Lee.docx
ICT104 Programming Assignment  Compiled By Divya Lee.docxICT104 Programming Assignment  Compiled By Divya Lee.docx
ICT104 Programming Assignment Compiled By Divya Lee.docx
tarifarmarie
 
Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6
helpido9
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6
comp274
 

Similar to Lesson 1 - Algorithm and Flowcharting.pdf (20)

DSA Lesson 2 - Algorithm and Flowcharting.pdf
DSA Lesson 2 - Algorithm and Flowcharting.pdfDSA Lesson 2 - Algorithm and Flowcharting.pdf
DSA Lesson 2 - Algorithm and Flowcharting.pdf
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
Programming Fundamental handouts
Programming Fundamental handoutsProgramming Fundamental handouts
Programming Fundamental handouts
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
 
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manual
 
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17 CBCS 2018 Scheme I sem Lab Manual for 18CPL17
CBCS 2018 Scheme I sem Lab Manual for 18CPL17
 
California State University, Fullerton College of Engineerin.docx
California State University, Fullerton College of Engineerin.docxCalifornia State University, Fullerton College of Engineerin.docx
California State University, Fullerton College of Engineerin.docx
 
Cs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUALCs2312 OOPS LAB MANUAL
Cs2312 OOPS LAB MANUAL
 
CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   
 
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com
 
CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.com
 
Cis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry universityCis355 a ilab 2 control structures and user defined methods devry university
Cis355 a ilab 2 control structures and user defined methods devry university
 
ICT104 Programming Assignment Compiled By Divya Lee.docx
ICT104 Programming Assignment  Compiled By Divya Lee.docxICT104 Programming Assignment  Compiled By Divya Lee.docx
ICT104 Programming Assignment Compiled By Divya Lee.docx
 
Chapter 2- Prog101.ppt
Chapter 2- Prog101.pptChapter 2- Prog101.ppt
Chapter 2- Prog101.ppt
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
 
Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6
 
Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6Cis 355 ilab 4 of 6
Cis 355 ilab 4 of 6
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
 
PSP LAB MANUAL.pdf
PSP LAB MANUAL.pdfPSP LAB MANUAL.pdf
PSP LAB MANUAL.pdf
 

More from ROWELL MARQUINA

QMMS Lesson 2 - Using Excel Formula.pptx
QMMS Lesson 2 - Using Excel Formula.pptxQMMS Lesson 2 - Using Excel Formula.pptx
QMMS Lesson 2 - Using Excel Formula.pptx
ROWELL MARQUINA
 
HCI Lesson 2 - Components of Human-Computer Interaction (HCI).pdf
HCI Lesson 2 - Components of Human-Computer Interaction (HCI).pdfHCI Lesson 2 - Components of Human-Computer Interaction (HCI).pdf
HCI Lesson 2 - Components of Human-Computer Interaction (HCI).pdf
ROWELL MARQUINA
 
ITSP Lesson 1 - Ethics and Ethical Theories.pdf
ITSP Lesson 1 - Ethics and Ethical Theories.pdfITSP Lesson 1 - Ethics and Ethical Theories.pdf
ITSP Lesson 1 - Ethics and Ethical Theories.pdf
ROWELL MARQUINA
 

More from ROWELL MARQUINA (18)

QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdf
 
QMMS Lesson 2 - Using Excel Formula.pptx
QMMS Lesson 2 - Using Excel Formula.pptxQMMS Lesson 2 - Using Excel Formula.pptx
QMMS Lesson 2 - Using Excel Formula.pptx
 
HCI Lesson 2 - Components of Human-Computer Interaction (HCI).pdf
HCI Lesson 2 - Components of Human-Computer Interaction (HCI).pdfHCI Lesson 2 - Components of Human-Computer Interaction (HCI).pdf
HCI Lesson 2 - Components of Human-Computer Interaction (HCI).pdf
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
 
DS Lesson 2 - Subsets, Supersets and Power Set.pdf
DS Lesson 2 - Subsets, Supersets and Power Set.pdfDS Lesson 2 - Subsets, Supersets and Power Set.pdf
DS Lesson 2 - Subsets, Supersets and Power Set.pdf
 
ITSP Lesson 6 - Information Privacy.pdf
ITSP Lesson 6 - Information Privacy.pdfITSP Lesson 6 - Information Privacy.pdf
ITSP Lesson 6 - Information Privacy.pdf
 
ITSP Lesson 5 - Intellectual Property Rights.pdf
ITSP Lesson 5 - Intellectual Property Rights.pdfITSP Lesson 5 - Intellectual Property Rights.pdf
ITSP Lesson 5 - Intellectual Property Rights.pdf
 
ITSP Lesson 1 - Ethics and Ethical Theories.pdf
ITSP Lesson 1 - Ethics and Ethical Theories.pdfITSP Lesson 1 - Ethics and Ethical Theories.pdf
ITSP Lesson 1 - Ethics and Ethical Theories.pdf
 
ITSP Lesson 1 - Ethics and Ethical Theories.pdf
ITSP Lesson 1 - Ethics and Ethical Theories.pdfITSP Lesson 1 - Ethics and Ethical Theories.pdf
ITSP Lesson 1 - Ethics and Ethical Theories.pdf
 
CHF Lesson 2 - Software and Software Categories.pdf
CHF Lesson 2 - Software and Software Categories.pdfCHF Lesson 2 - Software and Software Categories.pdf
CHF Lesson 2 - Software and Software Categories.pdf
 
Animation Lesson 4 - Tools and Equipment in Animation.pdf
Animation Lesson 4 - Tools and Equipment in Animation.pdfAnimation Lesson 4 - Tools and Equipment in Animation.pdf
Animation Lesson 4 - Tools and Equipment in Animation.pdf
 
DSA Lesson 1 - Introduction to Data Structures.pdf
DSA Lesson 1 - Introduction to Data Structures.pdfDSA Lesson 1 - Introduction to Data Structures.pdf
DSA Lesson 1 - Introduction to Data Structures.pdf
 
Lesson 1 - Introduction to Programming .pdf
Lesson 1 - Introduction to Programming .pdfLesson 1 - Introduction to Programming .pdf
Lesson 1 - Introduction to Programming .pdf
 
Animation Lesson 3 - Occupational Health and Safety Procedures.pdf
Animation Lesson 3 - Occupational Health and Safety Procedures.pdfAnimation Lesson 3 - Occupational Health and Safety Procedures.pdf
Animation Lesson 3 - Occupational Health and Safety Procedures.pdf
 
Animation Lesson 2 - Environment and Market (Updated).pdf
Animation Lesson 2 - Environment and Market (Updated).pdfAnimation Lesson 2 - Environment and Market (Updated).pdf
Animation Lesson 2 - Environment and Market (Updated).pdf
 
Animation Lesson 3 - Occupational Health and Safety Procedures.pdf
Animation Lesson 3 - Occupational Health and Safety Procedures.pdfAnimation Lesson 3 - Occupational Health and Safety Procedures.pdf
Animation Lesson 3 - Occupational Health and Safety Procedures.pdf
 
Personal Entrepreneurial Competencies (PECs).pdf
Personal Entrepreneurial Competencies (PECs).pdfPersonal Entrepreneurial Competencies (PECs).pdf
Personal Entrepreneurial Competencies (PECs).pdf
 
Environment and Market.pdf
Environment and Market.pdfEnvironment and Market.pdf
Environment and Market.pdf
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
The UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, OcadoThe UX of Automation by AJ King, Senior UX Researcher, Ocado
The UX of Automation by AJ King, Senior UX Researcher, Ocado
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 

Lesson 1 - Algorithm and Flowcharting.pdf

  • 1. TUNASAN NATIONAL HIGH SCHOOL SDO - Muntinlupa City ROWELL L. MARQUINA Senior High School Teacher TUNASAN NATIONAL HIGH SCHOOL Lesson 1 - Java Programming
  • 2. WHAT IS AN ALGORITHM? An algorithm refers to a series of well-defined instructions on how to accomplish a task or solve a specific problem. ▪ Giving directions on how to get to somebody’s house is an algorithm. ▪ Following a recipe for baking a cake is an algorithm. ▪ The steps to compute the for average is also an algorithm. IMAGE SOURCE: https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png https://www.flaticon.com/free-icon/coding_1085774
  • 3. STEPS IN CREATING AN ALGORITHM In creating an algorithm, it is very important to determine the exact goal or expected product first. The goal or expected product of the algorithm is called OUTPUT. IMAGE SOURCE: https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png https://www.flaticon.com/free-icon/coding_1085774
  • 4. STEPS IN CREATING AN ALGORITHM After determining the output, the next step is to identify the necessary materials or elements needed to accomplish the task. The necessary materials or elements for the program is called INPUT. IMAGE SOURCE: https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png https://www.flaticon.com/free-icon/coding_1085774
  • 5. STEPS IN CREATING AN ALGORITHM If the input and output are already identified, it is time to list the steps needed to accomplish the task. The steps needed to accomplish the task is referred to as the PROCESS. IMAGE SOURCE: https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png https://www.flaticon.com/free-icon/coding_1085774
  • 6.
  • 7. CHARACTERISTICS OF AN ALGORITHM ▪ It should have well-defined input and output. ▪ The steps should be stated clearly and unambiguously. ▪ It should have an exact start and end. ▪ It should be simple but precise. ▪ It should be practical. IMAGE SOURCE: https://imgbin.com/png/uxvDNRys/computer-programming-computer-icons-technology-algorithm-png https://www.flaticon.com/free-icon/coding_1085774
  • 8.
  • 9. WHAT IS A FLOWCHART? A flowchart is a diagram that illustrates a process, system or computer algorithm. IMAGE SOURCE: https://www.frevvo.com/blog/wp-content/uploads/2021/10/image5-2.png Flowcharts are widely used in multiple fields to document, study, plan, improve and communicate often complex processes in clear, easy-to- understand diagrams.
  • 10.
  • 11. FLOWCHART SYMBOLS The American National Standards Institute (ANSI) set standards for flowcharts and their symbols in the 1960s. IMAGE SOURCE: https://uploads-ssl.webflow.com/6184b461a39ff13bfb8c0556/61de99e8171cc6468145551d_flowchart-symbols-800.png In 1970 the International Organization for Standardization (ISO) adopted the ANSI symbols as the international standard for developing flowcharts.
  • 12. FLOWCHART SYMBOLS IMAGE SOURCE: https://uploads-ssl.webflow.com/6184b461a39ff13bfb8c0556/61de99e8171cc6468145551d_flowchart-symbols-800.png NAME OF SYMBOL SYMBOL FUNCTION Terminal Symbol Indicates the beginning and end of the flowchart. Flowline Symbol Its shows the process’ direction or the next steps in the process. Process Symbol It shows the process or operations to be carried out by the program Decision Symbol It shows the step that contains a control mechanism or decision. Input/Output Symbol It indicates the process of getting data from the user or displaying data on screen.
  • 13. FLOWCHART PROBLEM 1: DETERMINING USER’S AGE: Create a flowchart for a program that will require the user to input their year of birth. Using the user’s year of birth, the program will compute for the user’s age and display its result on the computer screen.
  • 14. FLOWCHART SAMPLE 1: START birthyear, age display “Enter Year of Birth:” input birthyear age = 2023 - birthyear display age END The program is initiated. The variables birthyear and age are introduced to the program as integers. The program displays the instruction “Enter Year of Birth: ” on screen . The program get an input from the user and store its value in the variable birthyear. The program computes for the value of age using the formula age = 2023 - birthyear. The program displays the value of age on the screen. The program is terminated.
  • 15. FLOWCHART PROBLEM 2: CONVERSION FROM KILOGRAM TO POUND: Create a flowchart for a program that will require the user to input a value in kilogram (kg). The program will convert the inputted value into pounds (lbs.) and display its results on the screen.
  • 16. FLOWCHART SAMPLE 1: START kilo, pound display “Enter Weight in Kilogram:” input kilo pound = kilo * 2.2 display pound END The program is initiated. The variables kilo and pound are introduced to the program. The program displays the instruction “Enter Weight in Kilogram:” on screen. The program get an input from the user and store its value in the variable kilo. The program computes for the value of pound using the formula pound = kilo*2.2. The program displays the value of pound on the screen. The program is terminated.
  • 17. FLOWCHART PROBLEM 3: COMPUTING FOR AREA: Create a flowchart for a program that will require the user to input the length and width of a rectangle. The program will compute for the area of the rectangle using the inputted length and with and display its results on the screen.
  • 18. FLOWCHART SAMPLE 1: START length, width, area display “Enter Length of the Rectangle:” input length display “Enter Width of the Rectangle:” input width A The program is initiated. The variables length, width, and area are introduced to the program as integers. The program displays the instruction “Enter Length of Rectangle: ” on screen . The program get an input from the user and store its value in the variable length. The program displays the instruction “Enter Width of Rectangle: ” on screen . The program get an input from the user and store its value in the width. The program will continue on the next part.
  • 19. FLOWCHART SAMPLE 1: A area = length * width display area END The program continues. The program computes for the value of area using the formula area = length*width. The program displays the value of area on the screen. The program is terminated.
  • 20. FLOWCHART PROBLEM 4: PLAYING WITH NUMBERS: Create a flowchart for a program that will require the user to input four numbers. Using the inputs, the program will compute for: ▪ the sum of 1st and 2nd number, ▪ the product of the 3rd and 4th number ▪ the square of the 2nd number
  • 21. FLOWCHART SAMPLE 1: START a, b, c, d, sum, product, square display “Enter the First Number:” input a display “Enter the Second Number:” input b A The program is initiated. The variables a, b, c, d, sum, product, and square are introduced to the program. The program displays the instruction “Enter the First Number: ” on screen . The program get an input from the user and store its value in the variable a. The program displays the instruction “Enter the Second Number: ” on screen . The program get an input from the user and store its value in the b. The program will continue on the next part.
  • 22. FLOWCHART SAMPLE 1: display “Enter the Third Number:” input c display “Enter the Fourth Number:” input d B The program continues. The program displays the instruction “Enter the Third Number: ” on screen . The program get an input from the user and store its value in the variable c. The program displays the instruction “Enter the Fourth Number: ” on screen . The program get an input from the user and store its value in the d. The program will continue on the next part. A
  • 23. FLOWCHART SAMPLE 1: B sum = a + b The program continues. The program computes for the value of sum using the formula sum = a + b. product = c * d The program computes for the value of product using the formula product = c*d. square = b * b The program computes for the value of square using the formula square = b*b. display sum The program displays the value of sum on the screen. display product The program displays the value of product on the screen. display square The program displays the value of square on the screen. END The program is terminated.
  • 24. FLOWCHART PROBLEM 5: PLAYING WITH NUMBERS: Create a flowchart for a program that will require the user to input four numbers. Using the inputs, the program will compute for: ▪ the cube of the 1st number, ▪ the half of the 2nd number, ▪ the 20% of the 3rd number, ▪ The product of multiplying the 4th number by 100
  • 25. FLOWCHART SAMPLE 1: START display “Enter the First Number:” input a display “Enter the Second Number:” input b A The program is initiated. The variables a, b, c, d, cube, half, twentypercent, and times100 are introduced to the program. The program displays the instruction “Enter the First Number: ” on screen . The program get an input from the user and store its value in the variable a. The program displays the instruction “Enter the Second Number: ” on screen . The program get an input from the user and store its value in the b. The program will continue on the next part. a, b, c, d, cube, half, twentypercent, times100
  • 26. FLOWCHART SAMPLE 1: display “Enter the Third Number:” input c display “Enter the Fourth Number:” input d B The program continues. The program displays the instruction “Enter the Third Number: ” on screen . The program get an input from the user and store its value in the variable c. The program displays the instruction “Enter the Fourth Number: ” on screen . The program get an input from the user and store its value in the d. The program will continue on the next part. A
  • 27. FLOWCHART SAMPLE 1: B cube = a*a*a The program continues. The program computes for the value of cube using the formula cube = a*a*a. half = b / 2 The program computes for the value of half using the formula half = b / 2. twentypercent = c * 0.20 The program computes for the value of twentypercent using the formula twentypercent = c*0.20. times100 = d * 100 The program computes for the value of times100 using the formula times100 = d*100. display cube The program displays the value of cube on the screen. display half The program displays the value of half on the screen. C The program will continue on the next part.
  • 28. FLOWCHART SAMPLE 1: C The program continues. display twentypercent The program displays the value of twentypercent on the screen. display times100 The program displays the value of times100 on the screen. END The program is terminated.
  • 29. PRACTICE TEST 1: DOLLAR TO PESO CONVERSION: Create a flowchart for a program that will require the user to input the amount in US Dollars. Using the inputted amount, the program will convert it to its Philippine Peso value and display the answer on the screen. Note: 1 US Dollar = Php 56.78
  • 30. PRACTICE TEST 2: COMPUTING FOR AVERAGE Create a flowchart for a program that will require the user to input their grades in Mathematics, English, and Science. The program will compute for the average of the three grades and display its result on the computer screen.
  • 31. PRACTICE TEST 3: PLAYING WITH NUMBERS: Create a flowchart for a program that will require the user to input four numbers. Using the inputs, the program will perform the following: ▪ display the 1st number, ▪ get the product of 1st and 3rd number, ▪ get the product of multiplying the 2nd number by the sum of the 3rd and 4th number, ▪ the average of the four numbers increased by 5.
  • 32. ALGORITHM AND FLOWCHARTING MR. ROWELL L. MARQUINA Tunasan National High School Senior High School Department Email Address: rowell.marquina001@deped.gov.ph sirrowellmarquina@gmail.com rmarquina@mitis.edu.ph