Page 85 - Trackpad_V1_Book 5_Flipbook
P. 85

Step  6     Drag  a  touching  mouse-pointer block  from the  Sensing  block  and  use  it
                             with  an  if block.  Click  on the  drop-down arrow present  next  to  touching

                             mouse pointer block and select edge from the list.
                 Step  7       Drag  a  play sound Meow from the                if

                             Sound blocks and place it inside the if…                  touching edge      ?    then
                             then block.                                            play sound  Meow

                 Step  8       Click  on Green Flag button  to  see the
                             output.




                                Role of Video Sensing extension in Scratch


                                                        Keep on clicking this icon until the
                                                              cat reaches the edge.


































                 Using the Sensing Menu                                            when       clicked
                 Now use the Sensing menu to ask the user for age,                 set  age    to 0

                 user types in age, or display the stored answer.                  ask   What’s your age?  and wait

                 Step  1       Create a variable named age.                           set  age    to answer


                 After creating  the  variable  age, let  us create  the          say  Join  I Know your age is  answer
                 following block stack for the sprite: Now, click on the
                 green flag.






                                                                                                  More on Scratch  83
   80   81   82   83   84   85   86   87   88   89   90