Page 50 - Computer_Genius_v2.1_C7_flipbook
P. 50

An algorithm is a set of steps in a sequential manner to solve a problem or to complete a task. These
                  steps are the foundation to a program. They are important to programming as recipes are for cooking.
                  An algorithm can be represented in two ways, Flowcharts and Pseudocodes. In this chapter we will
                  learn about the flowcharts.


                  Flowchart
                  A flowchart is a diagrammatic representation of the step-by-step plan that is supposed to be followed,
                  for solving a task/problem statement. This diagrammatic representation is made up of shapes like
                  boxes, circles, diamonds, parallelograms, ellipses connected by arrows. Each shape acts as a step in
                  the solution, and the arrows represent the direction of flow among the steps.


                                                  Start


                                           Input Lamp status




                                                 Lamp is        Yes
                                              working fine?


                                                     No


                                                 Lamp           No
                                               plugged in?               Plug in lamp


                                                     Yes


                                                  Bulb           No
                                              burned out?                Repair lamp


                                                     Yes

                                              Replace bulb                              Stop






                           When we search anything on Google, it gives us result based on an algorithm
                           written for it.




                  Advantages of Flowchart
                  Following are the advantages of flowchart:

                  l    Effective Communication: Flowcharts are better way of communicating the logic of the system.

                  l   Effective Analysis: Using flowchart problem can be analysed more efficiently.

                       48    Computer Genius (V2.1)-VII
   45   46   47   48   49   50   51   52   53   54   55