Page 137 - ScienceStd4
P. 137

or sound to repeat without clicking the Start button. This ability
              is known as repetition. When using repetition, you instruct the
              computer to repeat some action as many times as you want.


          FOR ONLINE READING ONLY
               Activity 11



               Playing sound repeatedly


               You can play sound by making it repetitive according to the
               number  of times you want. The following steps will guide you
               in a program that play sound repeatedly.


               Steps

               1.  Click on the ‘Events’ block menu.


               2.  Drag and drop the ‘when clicked’ block on the script area.

               3.  Click on the ‘Control’ block menu.


               4.  Drag and drop the ‘repeat (10)’ block on the script area.
                    Next,  attach  it  to  the  ‘when clicked’  block  as  shown in
                    Figure 33.


























                            Figure 33: Using the repeat block in a program



                                                   130



                                                                                            14/01/2025   18:38
     SCIENCE AND TECHNOLOGY STD 4.indd   130                                                14/01/2025   18:38
     SCIENCE AND TECHNOLOGY STD 4.indd   130
   132   133   134   135   136   137   138   139   140   141   142