SlideShare a Scribd company logo
1 of 15
• Disclaimer:This presentation is prepared by trainees of
  baabtra as a part of mentoring program. This is not official
  document of baabtra –Mentoring Partner
•   Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
ALGORITHMS
    &
FLOWCHARTS
   Ashwin Anand V
   Email:ashwinanand99@gmail.com
   Facebook id:ashwinanand99@gmail.com
Algorithm
An Algorithm is just a detailed sequence of simple
steps that are needed to solve a problem


Flowchart
A Flowchart is the graphical representation of
an Algorithm.
Steps to create an algorithm
• First produce a general algorithm

• Refine the algorithm successively to get step by step detailed
  algorithm that is very close to a computer language.

• Pseudo code is an artificial and informal language that helps
  programmers develop algorithms. Pseudo code is very similar
  to everyday English.
Example
Write an algorithm to determine a student’s final grade and indicate
whether it is passing or failing. The final grade is calculated as the
average of four marks.
 Pseudo code:
 • Input a set of 4 marks
 • Calculate their average by summing and dividing by 4
 • if average is below 50
        Print “FAIL”
   else
        Print “PASS”
Detailed Algorithm

    Step 1: Input M1,M2,M3,M4
     Step 2:       GRADE (M1+M2+M3+M4)/4
     Step 3:       if (GRADE < 50) then
                          Print “FAIL”
                   else
                          Print “PASS”
                   end
Flowchart Symbols
                         Basic
Name            Symbol      Use in Flowchart


Oval                        Denotes the beginning or end of the program




Parallelogram               Denotes an input operation




Rectangle                   Denotes a process to be carried out
                            e.g. addition, subtraction, division etc.




Diamond                     Denotes a decision (or branch) to be made.
                            The program should continue along one of
                            two routes. (e.g. IF/THEN/ELSE)




Hybrid                      Denotes an output operation




Flow line                   Denotes the direction of logic flow in the program
Example
              START
                                    Step 1:      Input
              Input
                                    M1,M2,M3,M4
           M1,M2,M3,M4
                                    Step 2:      GRADE
                                    (M1+M2+M3+M4)/4
   GRADE (M1+M2+M3+M4)/4
                                    Step 3:      if (GRADE <50) then
                                                 Print “FAIL”
  N                        Y
              IS
           GRADE<50
                                            else
                                                 Print “PASS”
PRINT                      PRINT            end
“PASS”                     “FAIL”




             STOP
Example
• Write an algorithm that reads two values, determines the
  largest value and prints the largest value with an identifying
  message.

ALGORITHM

Step 1:        Input A,B
Step 2:        if (A> B) then
                       MAX A
               else
                       MAX B
               end
Step 3:        Print “The largest value is”, MAX
• The expression A>B is a logical expression

• it describes a condition we want to test

• if A>B is true (if A is greater than B) we take the action on left

• print the value of A

• if A>B is false (if A is not greater than B) we take the action
  on right

• print the value of B
START



                       Input
                        A,B



          Y               is
                                        N
                         A>B




MAX   A                          MAX        B




                     Print
          “The largest value is”, MAX



                     STOP
• If this presentation helped you, please visit
  our page facebook.com/baabtra and like it.
  Thanks in advance.

• www.baabtra.com | www.massbaab.com |ww
  w.baabte.com
Thank you
Contact Us

More Related Content

Viewers also liked

Viewers also liked (18)

Dom structures
Dom structuresDom structures
Dom structures
 
List adapter with multiple objects
List adapter with multiple objectsList adapter with multiple objects
List adapter with multiple objects
 
Exceptions in python
Exceptions in pythonExceptions in python
Exceptions in python
 
Pygtk
PygtkPygtk
Pygtk
 
Jvm
JvmJvm
Jvm
 
Tablelayout
TablelayoutTablelayout
Tablelayout
 
Stored procedures in_mysql
Stored procedures in_mysqlStored procedures in_mysql
Stored procedures in_mysql
 
Pythonclass
PythonclassPythonclass
Pythonclass
 
treestore with parent and child
treestore with  parent and childtreestore with  parent and child
treestore with parent and child
 
User defined Function in SQL
User defined Function in SQLUser defined Function in SQL
User defined Function in SQL
 
Functions in python
Functions in python Functions in python
Functions in python
 
Xml
XmlXml
Xml
 
Asp .net folders and web.config
Asp .net folders and web.configAsp .net folders and web.config
Asp .net folders and web.config
 
Servlet
ServletServlet
Servlet
 
Shell programming in ubuntu
Shell programming in ubuntuShell programming in ubuntu
Shell programming in ubuntu
 
Working of web
Working of webWorking of web
Working of web
 
Normalisation and anomalies
Normalisation and anomaliesNormalisation and anomalies
Normalisation and anomalies
 
Database and different types of databases available in market
Database and different types of databases available in marketDatabase and different types of databases available in market
Database and different types of databases available in market
 

Similar to Algorithms&flowcharts

Programming fundamentals lecture 4
Programming fundamentals lecture 4Programming fundamentals lecture 4
Programming fundamentals lecture 4Raja Hamid
 
256958.ppt
256958.ppt256958.ppt
256958.pptBimlesh7
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1Jesuraj Love
 
Algorithms and flowcharts1
Algorithms and flowcharts1Algorithms and flowcharts1
Algorithms and flowcharts1Lincoln School
 
01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.pptFerdieBalang
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and FlowchartsDeva Singh
 
1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowcharts1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowchartsDani Garnida
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1rajnidhiman
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartsSamuel Igbanogu
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowchartskhair20
 
algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfAmanPratik11
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSKate Campbell
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..Nagendra N
 

Similar to Algorithms&flowcharts (20)

Programming fundamentals lecture 4
Programming fundamentals lecture 4Programming fundamentals lecture 4
Programming fundamentals lecture 4
 
Algorithm & flow chart
Algorithm & flow chartAlgorithm & flow chart
Algorithm & flow chart
 
256958.ppt
256958.ppt256958.ppt
256958.ppt
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithms and flowcharts1
Algorithms and flowcharts1Algorithms and flowcharts1
Algorithms and flowcharts1
 
01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt01 Algorithms And Flowcharts.ppt
01 Algorithms And Flowcharts.ppt
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithms and Flowcharts
Algorithms and FlowchartsAlgorithms and Flowcharts
Algorithms and Flowcharts
 
Presentation
PresentationPresentation
Presentation
 
Flowcharts
FlowchartsFlowcharts
Flowcharts
 
Presentation
PresentationPresentation
Presentation
 
flowcharts
flowchartsflowcharts
flowcharts
 
1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowcharts1153 algorithms%20and%20flowcharts
1153 algorithms%20and%20flowcharts
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithmsandflowcharts1
Algorithmsandflowcharts1Algorithmsandflowcharts1
Algorithmsandflowcharts1
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
Algorithms and flowcharts
Algorithms and flowchartsAlgorithms and flowcharts
Algorithms and flowcharts
 
algorithms and flow chart overview.pdf
algorithms and flow chart overview.pdfalgorithms and flow chart overview.pdf
algorithms and flow chart overview.pdf
 
ALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTSALGORITHMS AND FLOWCHARTS
ALGORITHMS AND FLOWCHARTS
 
Algorithms and flowcharts ppt (seminar presentation)..
 Algorithms and flowcharts  ppt (seminar presentation).. Algorithms and flowcharts  ppt (seminar presentation)..
Algorithms and flowcharts ppt (seminar presentation)..
 

More from baabtra.com - No. 1 supplier of quality freshers

More from baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Algorithms&flowcharts

  • 1.
  • 2. • Disclaimer:This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner • Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 3. ALGORITHMS & FLOWCHARTS Ashwin Anand V Email:ashwinanand99@gmail.com Facebook id:ashwinanand99@gmail.com
  • 4. Algorithm An Algorithm is just a detailed sequence of simple steps that are needed to solve a problem Flowchart A Flowchart is the graphical representation of an Algorithm.
  • 5. Steps to create an algorithm • First produce a general algorithm • Refine the algorithm successively to get step by step detailed algorithm that is very close to a computer language. • Pseudo code is an artificial and informal language that helps programmers develop algorithms. Pseudo code is very similar to everyday English.
  • 6. Example Write an algorithm to determine a student’s final grade and indicate whether it is passing or failing. The final grade is calculated as the average of four marks. Pseudo code: • Input a set of 4 marks • Calculate their average by summing and dividing by 4 • if average is below 50 Print “FAIL” else Print “PASS”
  • 7. Detailed Algorithm Step 1: Input M1,M2,M3,M4 Step 2: GRADE (M1+M2+M3+M4)/4 Step 3: if (GRADE < 50) then Print “FAIL” else Print “PASS” end
  • 8. Flowchart Symbols Basic Name Symbol Use in Flowchart Oval Denotes the beginning or end of the program Parallelogram Denotes an input operation Rectangle Denotes a process to be carried out e.g. addition, subtraction, division etc. Diamond Denotes a decision (or branch) to be made. The program should continue along one of two routes. (e.g. IF/THEN/ELSE) Hybrid Denotes an output operation Flow line Denotes the direction of logic flow in the program
  • 9. Example START Step 1: Input Input M1,M2,M3,M4 M1,M2,M3,M4 Step 2: GRADE (M1+M2+M3+M4)/4 GRADE (M1+M2+M3+M4)/4 Step 3: if (GRADE <50) then Print “FAIL” N Y IS GRADE<50 else Print “PASS” PRINT PRINT end “PASS” “FAIL” STOP
  • 10. Example • Write an algorithm that reads two values, determines the largest value and prints the largest value with an identifying message. ALGORITHM Step 1: Input A,B Step 2: if (A> B) then MAX A else MAX B end Step 3: Print “The largest value is”, MAX
  • 11. • The expression A>B is a logical expression • it describes a condition we want to test • if A>B is true (if A is greater than B) we take the action on left • print the value of A • if A>B is false (if A is not greater than B) we take the action on right • print the value of B
  • 12. START Input A,B Y is N A>B MAX A MAX B Print “The largest value is”, MAX STOP
  • 13. • If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. • www.baabtra.com | www.massbaab.com |ww w.baabte.com