SlideShare a Scribd company logo
Introduction ofAlgorithms
and Flowchart
What is an algorithm?
Named after Persian mathematician Mohammad
Al- Khwarizmi
A sequential solution of any problem
Written in human understandable form
Requires a clear understanding of the problem
What is an algorithm?
An algorithm describes
the step by step action to
solve a problem..
What is an algorithm?
An algorithm is a self-contained step-by-
step set of operations to be performed to
solve a specific problem or a class of
problems.
A computer program is a sequence of
instructions that comply the rules of a
specific programming language , written
to perform a specified task with a
computer.
Example of an algorithm
1. For example, an algorithm for driving
to a friend's house could be:
Example of an algorithm
Solution # 1
1. Find your keys
2. Walk out of the house
3. Close the door
4. Open the car door
5. Get into the car
6. Put the key into the ignition
7. Start the car
Example of an algorithm
2. Write an algorithm to change a numeric
grade to a pass/fail grade.
15
Example of an algorithm
Solution # 2
Pass/Fail Grade
Input: One number
if (the number is greater than or equal to 50)
then
1.1 Set the grade to “pass”
else
1.2 Set the grade to “fail”
End if
Print the grade
End
Example of an algorithm
15
3. Write an algorithm for grading system by following
method.
Marks range Grade
>=80 A
>=70 & <80 B
>=60 & <70 C
>=50 & <60 D
<50 F
Example of an algorithm
Solution # 3
Input: One number
1. if (the number is between 80 and 100, inclusive)
then
1. Set the grade to “A”
End if
2. if (the number is between 70 and 79,
inclusive)
then
1. Set the grade to “B”
End if
3. if (the number is between 60 and 69, inclusive)
then
1. Set the grade to “C” End
End if
4. if (the number is between 50 and 59, inclusive)
then
1. Set the grade to “D” End
End if
5. If (the number is less than 50)
then
1. Set the grade to “F” End
End if
6. Print the grade
End
Flowchart
A graphical representation of an
algorithm, often used in the design
phase of programming to work out the
logical flow of a program.
Visual way to represent the information flow
Make our logic more clear
Help during writing of program
Make testing and debugging easy
Basic Flowcharting Symbols
Basic Flowcharting Symbols
SYMBOL ACTIVITY
ON PAGE CONNECTOR
OFF PAGE
CONNECTOR
Flowchart or program constructs
 Sequence: The order of execution, this
typically refers to the order in which the
code will execute. Normally code
executes line by line, so line 1 then 2
then 3 and so on.
 Selection: Selection, like branching, is a
method of controlling the execution
sequence, you can create large control
blocks, using if statements testing a
Flowchart or program constructs
 condition, or switch statements
evaluating a variable etc to control and
change the execution of the program
depending on this environment and
changing variables.
 Iteration (Repetition): Iteration is typically
used to refer to collections and arrays of
variables and data. Repeating set of
instruction. Counting from 1 to 10, you are
Flowchart or program constructs
 iterating over the first 10 numbers. for,
while, do-while loops will be
implemented for iteration.
Flowchart or program constructs
Flowchart or program constructs
Flowchart or program constructs
Write an algorithm and draw a flowchart that will read
the two sides of a rectangle and calculate its area.
Algorithm
Step 1: Start
Step 2: Take Width and Length as input
Step 3: Calculate Area by Width* Length
Step 4: Print Area.
Step 5: End
Step 1:
Step 2:
Step 3:
Step 4:
Step 5:
Start
Input W, L
A = L x W
Print A
End
Input
W, L
A = Lx W
END
Print
A
START
Write an algorithm and draw a flowchart
that will take marks of four subjects and
calculate the average. Then if average
marks are greater than 50 then print
PASS otherwise print FAIL.
Step 1: Start
Step 2: Input M1,M2,M3,M4
Step 3: AVG = (M1+M2+M3+M4)/4
Step 4: if (AVG <50) then
Print “FAIL”
else
Print “PASS”
endif
Step 5: End
START
Input
M1,M2,M3,M4
AVG(M1+M2+M3+M4)/4
IS
AVG<50
END
Y
N
Print
“PASS”
Print
“FAIL”
Write an algorithm and draw a
flowchart to convert the length in feet
to centimeter.
Algorithm
Step 1:
Step 2:
Start
Input ft
Step 3: cm = ft * 30
Step 4: Print cm
Step 5: End
Input
ft
cm = ft x 30
END
Flowchart
Print cm
START
THANK YOU!!!

More Related Content

PPT
Programming algorithms and flowchart.ppt
PPSX
Algorithm and flowchart
PPT
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
PPT
3 algorithm-and-flowchart
PDF
Fundamental of Information Technology - UNIT 6
PDF
algorithms and flow chart overview.pdf
PPTX
flowchart & algorithms
PPT
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Programming algorithms and flowchart.ppt
Algorithm and flowchart
BCE L-2 Algorithms-and-Flowchart-ppt.ppt
3 algorithm-and-flowchart
Fundamental of Information Technology - UNIT 6
algorithms and flow chart overview.pdf
flowchart & algorithms
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt

Similar to ALGORITHM PPT GUIDE.pdf (20)

PPTX
Algorithm and flowchart
PDF
ALGORITHMS AND FLOWCHARTS
PDF
Flowcharts. Algorithms and pseudo codepdf
PPT
Algorithms and Flowchart.ppt
PPTX
Algorithms-Flowcharts for programming fundamental
PPTX
Algorithm and flowchart.pptx
PPT
Algorithms and Flowchart usages in C laguage
PDF
What is an Algorithm and Flow Chart along with step wise problem solvingt
PDF
AlgorithmAndFlowChart.pdf
PPTX
Data Structures_Introduction to algorithms.pptx
PPT
PPTX
Flowchart and algorithm
PPTX
Algorithms and flowcharts
PPT
Lect1-Algorithms-and-Flowchart-ppt (1).ppt
PPT
Lecture1-Algorithms-and-Flowchart-ppt.ppt
PPT
Lect1 - Algorithms-and-Flowchart-ppt.ppt
PPT
Lecture1-Algorithms-and-Flowchart-ppt.ppt
PPT
Lect1-Algorithms-and-Flowchart PPT presentation
PPT
Algorithms and Flowchart for IGCSE Students
PPT
Lect1-Detailed description aboutAlgorithms-and-Flowchart.ppt
Algorithm and flowchart
ALGORITHMS AND FLOWCHARTS
Flowcharts. Algorithms and pseudo codepdf
Algorithms and Flowchart.ppt
Algorithms-Flowcharts for programming fundamental
Algorithm and flowchart.pptx
Algorithms and Flowchart usages in C laguage
What is an Algorithm and Flow Chart along with step wise problem solvingt
AlgorithmAndFlowChart.pdf
Data Structures_Introduction to algorithms.pptx
Flowchart and algorithm
Algorithms and flowcharts
Lect1-Algorithms-and-Flowchart-ppt (1).ppt
Lecture1-Algorithms-and-Flowchart-ppt.ppt
Lect1 - Algorithms-and-Flowchart-ppt.ppt
Lecture1-Algorithms-and-Flowchart-ppt.ppt
Lect1-Algorithms-and-Flowchart PPT presentation
Algorithms and Flowchart for IGCSE Students
Lect1-Detailed description aboutAlgorithms-and-Flowchart.ppt
Ad

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Big Data Technologies - Introduction.pptx
PPTX
A Presentation on Artificial Intelligence
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Spectroscopy.pptx food analysis technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MYSQL Presentation for SQL database connectivity
Big Data Technologies - Introduction.pptx
A Presentation on Artificial Intelligence
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
A comparative analysis of optical character recognition models for extracting...
Spectral efficient network and resource selection model in 5G networks
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Programs and apps: productivity, graphics, security and other tools
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
The AUB Centre for AI in Media Proposal.docx
Advanced methodologies resolving dimensionality complications for autism neur...
Spectroscopy.pptx food analysis technology
Encapsulation_ Review paper, used for researhc scholars
Mobile App Security Testing_ A Comprehensive Guide.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
gpt5_lecture_notes_comprehensive_20250812015547.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Dropbox Q2 2025 Financial Results & Investor Presentation
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Ad

ALGORITHM PPT GUIDE.pdf

  • 2. What is an algorithm? Named after Persian mathematician Mohammad Al- Khwarizmi A sequential solution of any problem Written in human understandable form Requires a clear understanding of the problem
  • 3. What is an algorithm? An algorithm describes the step by step action to solve a problem..
  • 4. What is an algorithm? An algorithm is a self-contained step-by- step set of operations to be performed to solve a specific problem or a class of problems. A computer program is a sequence of instructions that comply the rules of a specific programming language , written to perform a specified task with a computer.
  • 5. Example of an algorithm 1. For example, an algorithm for driving to a friend's house could be:
  • 6. Example of an algorithm Solution # 1 1. Find your keys 2. Walk out of the house 3. Close the door 4. Open the car door 5. Get into the car 6. Put the key into the ignition 7. Start the car
  • 7. Example of an algorithm 2. Write an algorithm to change a numeric grade to a pass/fail grade. 15
  • 8. Example of an algorithm Solution # 2 Pass/Fail Grade Input: One number if (the number is greater than or equal to 50) then 1.1 Set the grade to “pass” else 1.2 Set the grade to “fail” End if Print the grade End
  • 9. Example of an algorithm 15 3. Write an algorithm for grading system by following method. Marks range Grade >=80 A >=70 & <80 B >=60 & <70 C >=50 & <60 D <50 F
  • 10. Example of an algorithm Solution # 3 Input: One number 1. if (the number is between 80 and 100, inclusive) then 1. Set the grade to “A” End if 2. if (the number is between 70 and 79, inclusive) then 1. Set the grade to “B” End if
  • 11. 3. if (the number is between 60 and 69, inclusive) then 1. Set the grade to “C” End End if 4. if (the number is between 50 and 59, inclusive) then 1. Set the grade to “D” End End if 5. If (the number is less than 50) then 1. Set the grade to “F” End End if 6. Print the grade End
  • 12. Flowchart A graphical representation of an algorithm, often used in the design phase of programming to work out the logical flow of a program. Visual way to represent the information flow Make our logic more clear Help during writing of program Make testing and debugging easy
  • 14. Basic Flowcharting Symbols SYMBOL ACTIVITY ON PAGE CONNECTOR OFF PAGE CONNECTOR
  • 15. Flowchart or program constructs  Sequence: The order of execution, this typically refers to the order in which the code will execute. Normally code executes line by line, so line 1 then 2 then 3 and so on.  Selection: Selection, like branching, is a method of controlling the execution sequence, you can create large control blocks, using if statements testing a
  • 16. Flowchart or program constructs  condition, or switch statements evaluating a variable etc to control and change the execution of the program depending on this environment and changing variables.  Iteration (Repetition): Iteration is typically used to refer to collections and arrays of variables and data. Repeating set of instruction. Counting from 1 to 10, you are
  • 17. Flowchart or program constructs  iterating over the first 10 numbers. for, while, do-while loops will be implemented for iteration.
  • 18. Flowchart or program constructs
  • 19. Flowchart or program constructs
  • 20. Flowchart or program constructs
  • 21. Write an algorithm and draw a flowchart that will read the two sides of a rectangle and calculate its area. Algorithm Step 1: Start Step 2: Take Width and Length as input Step 3: Calculate Area by Width* Length Step 4: Print Area. Step 5: End
  • 22. Step 1: Step 2: Step 3: Step 4: Step 5: Start Input W, L A = L x W Print A End Input W, L A = Lx W END Print A START
  • 23. Write an algorithm and draw a flowchart that will take marks of four subjects and calculate the average. Then if average marks are greater than 50 then print PASS otherwise print FAIL.
  • 24. Step 1: Start Step 2: Input M1,M2,M3,M4 Step 3: AVG = (M1+M2+M3+M4)/4 Step 4: if (AVG <50) then Print “FAIL” else Print “PASS” endif Step 5: End START Input M1,M2,M3,M4 AVG(M1+M2+M3+M4)/4 IS AVG<50 END Y N Print “PASS” Print “FAIL”
  • 25. Write an algorithm and draw a flowchart to convert the length in feet to centimeter.
  • 26. Algorithm Step 1: Step 2: Start Input ft Step 3: cm = ft * 30 Step 4: Print cm Step 5: End Input ft cm = ft x 30 END Flowchart Print cm START