Page 81 - PlugGPT_V2.0_C4_Flipbook
P. 81

The sprite draws a non-stop line wherever it moves using                    pen down .

                    Use       set pen color to   block to set the colour of the pen to a colour of your
                   choice from the drop-down menu.


















                        Change pen color  by 10  block changes the pen  colour,  saturation,  brightness
                   and transparency. Click on the first text box to select and change the pen effects.
                   Click on the second text box to give a value by which the effect will change.

                        set pen color  to  50  block will set the pen colour, saturation,  brightness and
                   transparency to the given value.
                 Clickipedia




                   A loop is a process which instructs a computer to repeat a set of commands,
                   a specified number of times.


                     USE OF LOOP BLOCKS

                 All the programs or projects developed till now run only once. If you want to run
                 a set of statements more than once, you will either run the code again or write

                 the script again. In Scratch, we can save our time and effort by repeating the code
                 without  writing  the  program  again  or  writing  the  script again.  The  automatic
                 running of a set of instructions more than once is called looping. The blocks for
                 looping are given in the Control category.

                 The repeat block is used to run a set of instructions for a specified
                 number of times.


                               The  repeat  until  block is used to run a set of instructions till a

                               condition is satisfied.


                 The forever block is used to run a set of instructions continuously

                 until stopped. The instructions inside this block will be executed in a
                 loop until the Stop button            is clicked by the user.


                                                                                               More on Scratch       79
   76   77   78   79   80   81   82   83   84   85   86