Page 51 - CT_AI_Class-5
P. 51

An algorithm is simply a set of step-by-step instructions that are followed in a specific
                          order to solve a problem or complete a task.

                          Writing an algorithm means breaking a task into simple steps.
                          Logical thinking is when you make decisions based on facts and rules, not feelings or
                          guesses.

                          The flow of instructions means the order in which steps are followed.
                          In sequence, the steps happen one after another, in a fixed order, from start to finish.

                          In selection, the algorithm comes to a point where it needs to ask a question.
                          In repetition, some steps are repeated again and again.
                          Finding and correcting mistakes in an algorithm is called debugging.

                          ATM machine, search engine, traffic lights and sorting books in a library are some
                          examples of algorithm in real-life.









                 A.  Tick ( ) the correct option.

                    1.  Which of the following should be kept in mind while writing an algorithm?

                              a)  Only experts should understand it

                              b)  Steps can be unclear and confusing


                              c)  Anyone should be able to follow the steps

                              d)  Steps should be written in any random order

                    2.  In the given example of deciding what to wear, what are ‘if–then statements’ called?

                          If it is raining → Wear a raincoat.
                          If it is sunny → Wear light clothes

                              a)  Steps                                    b)  Conditions

                              c)  Errors                                   d)  Loops

                    3.  Which of the following is not a type of flow of instructions?

                              a)  Recognition                              b)  Sequence


                              c)  Selection                                d)  Repetition







                                                                                          Algorithmic Thinking    49
   46   47   48   49   50   51   52   53   54   55   56