Page 54 - PortGPT_V2.1_C6_Flipbook
P. 54

4                                 Algorithms with





                                                               Block Coding










                          Learning Outcomes
                       Introduction                                         Searching for a Word in Dictionary

                       Algorithm                                            Flowchart
                       Pseudocode                                           Getting started with Block Coding




                  INTRODUCTION
                  So far, you have understood that coding is associated with many day to day activities. For
                  example, a traffic light works on coding. In this chapter, you will learn how to understand a

                  situation and write codes according to it.                          Q

                  SEARCHING FOR A WORD IN DICTIONARY

                  A dictionary is a book which  contains words and                          f          ANSWERS
                  phrases in an alphabetical order, with their meanings.          A

                  Many times, while reading a book you may come                             C          b       K
                  across  a word whose meaning you don’t  know. So              B
                  how do you find out the meaning of the word?                                                    a

                  You  will  find  the  meaning  of  the  word  by  using  a
                  dictionary. But when you open a dictionary you see,

                  there are many words in a dictionary. So how do you
                  find that particular word in the dictionary?

                  Let’s see an example to find the word 'Orange' in a dictionary:

                  1.  Find the dictionary section with the first letter of the word, ‘o’.

                  2.  Within the list of words starting the first letter ‘o’, find the section having the second
                      letter of the word ‘r’.

                  3.  You need to do this process again with the third letter ‘a’, fourth letter ‘n’,  fifth letter ‘g’
                      and sixth letter ‘e’, until you finally reach the word ‘orange’ in the dictionary and then

                      find its meaning.



                  52    Premium Edition-VI
   49   50   51   52   53   54   55   56   57   58   59