Page 90 - TP_Play_V2.1_class5
P. 90

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.


                   88       Play (Ver. 2.1)-V
   85   86   87   88   89   90   91   92   93   94   95