SlideShare a Scribd company logo
1 of 9
INTRODUCTION TO PROGRAMMING
Algorithm It is a list of instructions specifying a precise description of a step by step process that terminates after a finite number of steps for solving an algorithm problem producing the correct answer in the end. It is a recipe for solving problems.  A finite set of an instruction that specifies a sequence of operation to be carried out in order to solve a specific problem.  An unambiguous procedure specifying a finite number of steps to be taken.
Methods of Specifying Algorithm Pseudocode - specifies the steps of algorithm using essentially natural language of superimposed control structure. Flowchart - a traditional graphical tool with standardized symbols.  Show the sequence of steps in an algorithm.
Properties of Algorithm Finiteness - there is an exact number of steps to be taken and has an end. Absence of Ambiguity - means that every instruction is precisely described and clearly specified. Sequence of Execution - instructions are performed from top to bottom. Input and Output - defined the unknowns of the problem is specified and with the expected outcome. Effectiveness- the solution prescribed is guaranteed to give a correct answer and that the specified process is faithfully carried out. Scope Definition - applies to a specific problem or class of problem.
Steps in Program Development State the problem clearly- a problem cannot be solved correctly unless it is being understood. Plan and Write the Logical Order of Instructions - the computer follows the direction exactly at the given sequence. Code the Program - write the programming statements in the desired language. Enter the program into the computer - key in or type the statement into the computer. Run and Debug the program - check if you have the desired output; if not, trace the possible error.
Flowcharting Guidelines The flowchart should flow from top to bottom If the chart becomes complex, utilize connecting blocks Avoid intersecting flow lines Use meaningful description in the symbol
Flowcharting Symbols
Flowcharting Symbols
Sample Exercises Sample 1: Write a program that calculates the sum of two input numbers and display the result.   Sample 2: Write a program to calculate the area of a circle and display the result.  Use the formula: A=πr2  where Pi is approximately equal to 3.1416.   Sample 3: Write a program that computes the average of three input quizzes, and then display the result.   Sample 4: Write a program that converts the input Fahrenheit degree into its Celsius degree equivalent.  Use the formula: C= (5/9)*F-32.   Sample 5: Create a program to compute the volume of a sphere.  Use the formula: V= (4/3)* πr3 where is pi equal to 3.1416 approximately.  The r3 is the radius.  Display result.   Sample 6:Write a program that converts the input Celsius degree into its equivalent Fahrenheit degree.  Use the formula: F= (9/5) * C+32.

More Related Content

What's hot

Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
lotlot
 
Chapter 2 Representation Of Algorithms 2
Chapter 2  Representation Of  Algorithms 2Chapter 2  Representation Of  Algorithms 2
Chapter 2 Representation Of Algorithms 2
Li-Anne Serrano
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
Nahid Hasan
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
hermiraguilar
 

What's hot (20)

Chapter 6 algorithms and flow charts
Chapter 6  algorithms and flow chartsChapter 6  algorithms and flow charts
Chapter 6 algorithms and flow charts
 
Algorithm Introduction
Algorithm IntroductionAlgorithm Introduction
Algorithm Introduction
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
SPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and FlowchartSPL 2 | Algorithms, Pseudo-code, and Flowchart
SPL 2 | Algorithms, Pseudo-code, and Flowchart
 
Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer   Unit 1. Problem Solving with Computer
Unit 1. Problem Solving with Computer
 
Introduction to flowchart
Introduction to flowchartIntroduction to flowchart
Introduction to flowchart
 
Algorithm and flowchart
Algorithm and flowchartAlgorithm and flowchart
Algorithm and flowchart
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language Lecture 5 - Structured Programming Language
Lecture 5 - Structured Programming Language
 
Pseudocode-Flowchart
Pseudocode-FlowchartPseudocode-Flowchart
Pseudocode-Flowchart
 
Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)Algorithm and Programming (Introduction of Algorithms)
Algorithm and Programming (Introduction of Algorithms)
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Chapter 2 Representation Of Algorithms 2
Chapter 2  Representation Of  Algorithms 2Chapter 2  Representation Of  Algorithms 2
Chapter 2 Representation Of Algorithms 2
 
Our presentation on algorithm design
Our presentation on algorithm designOur presentation on algorithm design
Our presentation on algorithm design
 
Algorithm Design & Implementation
Algorithm Design & ImplementationAlgorithm Design & Implementation
Algorithm Design & Implementation
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
ppt of flowchart
ppt of flowchartppt of flowchart
ppt of flowchart
 
pseudocode and Flowchart
pseudocode and Flowchartpseudocode and Flowchart
pseudocode and Flowchart
 
Introduction to Algorithms & flow charts
Introduction to Algorithms & flow chartsIntroduction to Algorithms & flow charts
Introduction to Algorithms & flow charts
 
Algorithm and pseudo codes
Algorithm and pseudo codesAlgorithm and pseudo codes
Algorithm and pseudo codes
 

Viewers also liked (6)

Flowchart and algorithm
Flowchart and algorithmFlowchart and algorithm
Flowchart and algorithm
 
Writing algorithms
Writing algorithmsWriting algorithms
Writing algorithms
 
Introduction to Pseudocode
Introduction to PseudocodeIntroduction to Pseudocode
Introduction to Pseudocode
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 

Similar to Algorithm and flowchart

01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx
ssuser586772
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
Saurabh846965
 

Similar to Algorithm and flowchart (20)

01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx01 Introduction to analysis of Algorithms.pptx
01 Introduction to analysis of Algorithms.pptx
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
lecture 5
 lecture 5 lecture 5
lecture 5
 
Introduction to computer science
Introduction to computer scienceIntroduction to computer science
Introduction to computer science
 
Chap6
Chap6Chap6
Chap6
 
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.pptLecture1-Algorithms-and-Flowcharts-ppt.ppt
Lecture1-Algorithms-and-Flowcharts-ppt.ppt
 
Basic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and FlowchartsBasic Slides on Algorithms and Flowcharts
Basic Slides on Algorithms and Flowcharts
 
Algorithm and flowchart.pptx
Algorithm and flowchart.pptxAlgorithm and flowchart.pptx
Algorithm and flowchart.pptx
 
UNIT 1.pptx
UNIT 1.pptxUNIT 1.pptx
UNIT 1.pptx
 
Data structures algorithms basics
Data structures   algorithms basicsData structures   algorithms basics
Data structures algorithms basics
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Algorithms
AlgorithmsAlgorithms
Algorithms
 
Module 1 python.pptx
Module 1 python.pptxModule 1 python.pptx
Module 1 python.pptx
 
Unit 1 python (2021 r)
Unit 1 python (2021 r)Unit 1 python (2021 r)
Unit 1 python (2021 r)
 
Software develop....
Software develop.... Software develop....
Software develop....
 
PCCF UNIT 1.pptx
PCCF UNIT 1.pptxPCCF UNIT 1.pptx
PCCF UNIT 1.pptx
 
Algorithms notes 2 tutorials duniya
Algorithms notes 2   tutorials duniyaAlgorithms notes 2   tutorials duniya
Algorithms notes 2 tutorials duniya
 
ALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdfALGORITHM PPT GUIDE.pdf
ALGORITHM PPT GUIDE.pdf
 
Algorithm for computational problematic sit
Algorithm for computational problematic sitAlgorithm for computational problematic sit
Algorithm for computational problematic sit
 
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.pptLecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
Lecture_01-Problem_Solving[1]||ProgrammingFundamental.ppt
 

More from Elizabeth de Leon Aler (9)

Excel07 l1 ch1
Excel07 l1 ch1Excel07 l1 ch1
Excel07 l1 ch1
 
Paano
PaanoPaano
Paano
 
Fumar
FumarFumar
Fumar
 
Ch1
Ch1Ch1
Ch1
 
Binary arithmetic
Binary arithmeticBinary arithmetic
Binary arithmetic
 
Application software
Application softwareApplication software
Application software
 
Access07 l1 ch2
Access07 l1 ch2Access07 l1 ch2
Access07 l1 ch2
 
Access07 l1 ch1
Access07 l1 ch1Access07 l1 ch1
Access07 l1 ch1
 
Ch1
Ch1Ch1
Ch1
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 

Algorithm and flowchart

  • 2. Algorithm It is a list of instructions specifying a precise description of a step by step process that terminates after a finite number of steps for solving an algorithm problem producing the correct answer in the end. It is a recipe for solving problems. A finite set of an instruction that specifies a sequence of operation to be carried out in order to solve a specific problem. An unambiguous procedure specifying a finite number of steps to be taken.
  • 3. Methods of Specifying Algorithm Pseudocode - specifies the steps of algorithm using essentially natural language of superimposed control structure. Flowchart - a traditional graphical tool with standardized symbols. Show the sequence of steps in an algorithm.
  • 4. Properties of Algorithm Finiteness - there is an exact number of steps to be taken and has an end. Absence of Ambiguity - means that every instruction is precisely described and clearly specified. Sequence of Execution - instructions are performed from top to bottom. Input and Output - defined the unknowns of the problem is specified and with the expected outcome. Effectiveness- the solution prescribed is guaranteed to give a correct answer and that the specified process is faithfully carried out. Scope Definition - applies to a specific problem or class of problem.
  • 5. Steps in Program Development State the problem clearly- a problem cannot be solved correctly unless it is being understood. Plan and Write the Logical Order of Instructions - the computer follows the direction exactly at the given sequence. Code the Program - write the programming statements in the desired language. Enter the program into the computer - key in or type the statement into the computer. Run and Debug the program - check if you have the desired output; if not, trace the possible error.
  • 6. Flowcharting Guidelines The flowchart should flow from top to bottom If the chart becomes complex, utilize connecting blocks Avoid intersecting flow lines Use meaningful description in the symbol
  • 9. Sample Exercises Sample 1: Write a program that calculates the sum of two input numbers and display the result.   Sample 2: Write a program to calculate the area of a circle and display the result. Use the formula: A=πr2 where Pi is approximately equal to 3.1416.   Sample 3: Write a program that computes the average of three input quizzes, and then display the result.   Sample 4: Write a program that converts the input Fahrenheit degree into its Celsius degree equivalent. Use the formula: C= (5/9)*F-32.   Sample 5: Create a program to compute the volume of a sphere. Use the formula: V= (4/3)* πr3 where is pi equal to 3.1416 approximately. The r3 is the radius. Display result.   Sample 6:Write a program that converts the input Celsius degree into its equivalent Fahrenheit degree. Use the formula: F= (9/5) * C+32.