Page 88 - 2502_Pakistan-kifayat_C-7
P. 88

Test the algorithm to see if it works properly.

                  Make changes if needed to improve it.


                                                              Hintbot


                   Before solving a problem, make sure the input is correct and useful. If the input is wrong or in
                   the wrong format, the output may also be wrong.
                   For example, If the program asks for a number and the user types “ten” instead of 10, the
                   program may not understand and give an error.




              To solve a complex problem easily, divide it into smaller parts. Each part is a sub-solution that helps
              complete the main task.

              Example 1: To create a class presentation, we can divide the tasks into sub-task.
              1.  Choose a topic

              2.  Collect information

                 • From books

                 • From the internet
                 • From teacher notes

              3.  Prepare slides

                 • Add headings

                 • Organise content
              4.  Add images and titles

                 • Use relevant pictures

                 • Add clear titles to each slide
              5.  Practise the presentation

                 • Read aloud

                 • Time your presentation
              6.   Present it in class

                 • Speak clearly

                 • Show your slides confidently
              Each step plays an important role in completing the full task smoothly and in an organised way.


              Example 2: To calculate the area of the circle and display it.
              Step 1:  Start

              Step 2:   Input radius.



                  86  Premium Edition-VII
   83   84   85   86   87   88   89   90   91   92   93