Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 57 - 2612 Digimind C6
P. 57

    MAKING A CUP OF TEA                                    CALCULATE THE SUM OF TWO NUMBERS

                    Write the following steps for an algorithm to make     Write  the following steps  for  an algorithm  to
                    a cup to tea:                                          calculate the sum of two numbers:
                    Step  1   Start.                                       Step  1   Start.

                    Step  2    Collect  Kettle,  Teabags, water, milk,     Step  2    Read two numbers and store them
                               sugar and cup.                                        in A and B.
                    Step  3   Boil the water in the kettle.                Step  3   Add two numbers A and B.
                    Step  4   Pour the boiling water into the cup.         Step  4   Print the sum.

                    Step  5    Add milk, sugar and put a teabag in         Step  5   Stop.
                               the cup.
                    Step  6   Stir the tea and the tea is ready.

                    Step  7   Stop.

                     CALCULATING THE AREA OF A CIRCLE

                     Write the following steps for an algorithm to calculate the area of a circle:
                     Step  1   Start.
                     Step  2    Read the radius of the circle and store it in r. (where, r is the length from the centre of
                               the circle to the edge of the circle.)

                     Step  3   Calculate the area of the circle. (Where, Area = π × r (3.14 × radius × radius))
                                                                                    2
                     Step  4   Print the area.
                     Step  5   Stop.

                               FLOWCHART

                     A flowchart is the graphical representation of a process and the logic (also referred to as an
                     algorithm) used in it. Flowcharts are used in analysing, designing, documenting or managing a
                     process or program in various fields.

                     SYMBOLS USED IN FLOWCHARTS
                     A flowchart uses specific geometrical shapes and directional arrows to draw a flow chart for a
                     particular task. A set of geometrical shapes represents the steps involved in the solution process.

                     Each shape represents a specific function, activity or process. Directional arrows are used to
                     connect the shapes, indicating the flow of the solution.

                          Tick ( ) if you know this.
                          ▶  Algorithms make decision-making more consistent and efficient.

                          ▶  Flowchart is the graphical representation of a process and the logic used in it.

                                                                                    Algorithm, Flowcharts and Mind Maps  55

| 52 53 54 55 56 57 58 59 60 61 62 |