Page 70 - TP_Modular_V2.1_Class5
P. 70

Reporter Blocks

                  A reporter block is a block that reports or returns a value. Reporter
                  blocks can hold values, which consist of numbers or strings. If you
                  ask, “What is 3 + 3 ?”, it will answer “6”. They have rounded edges.

                  C Blocks


                  As the name suggests C blocks are C shaped. They are also known
                  as  Wrap  blocks. These  are loop blocks  to check if  a condition
                  mentioned in the blocks is true. The C blocks are present in the
                  Control blocks category.

                  CAP Blocks

                  The blocks that end scripts are known as CAP blocks. They have a
                  notch at the top and a flat bottom. They are usually the last blocks in

                  the script. They are also present in the Control blocks category.

                      SENSING BLOCKS

                  Sensing blocks in Scratch sense the input from the keyboard or the mouse at the
                  time of execution of a script. Some of the sensing blocks and their functions are
                  given below:


                                                 block prompts the user to type the input using the
                     keyboard. It waits for the user input. No other block runs at that time.
                                                   block checks if the sprite touches the mouse-pointer,

                     another sprite or the edge of stage. If the answer is true, then it executes the
                     blocks given after it in the condition. If false, then it executes other blocks as per
                     the given condition.

                                           block checks if the sprite is touching the color chosen in the
                     block. If true, then it executes a set of blocks, else executes another set of blocks.

                                                  The  block checks if the  first chosen color  is touching
                     the second chosen color. If true, then it executes a set of blocks, else executes

                     another set of blocks.
                                              block checks if the chosen key is pressed by the user. If true,

                     then it executes a set of blocks, else executes another set of blocks.
                    Let us create a small script to understand the working of sensing blocks.
                  Sensing an Input


                  To add sensing blocks to the script, follow the given steps:
                  Step 1   Click on the Sensing block category in Tabs.


                   68       Modular (Ver. 2.1)-V
   65   66   67   68   69   70   71   72   73   74   75