Page 84 - Trackpad_ipro 4.1_Class6
P. 84

Drag the Event block, when green flag clicked to the script area. Drag the control block, forever
                  to the script area and put it to the green flag block. Drag the move block and put it inside the
                  forever block. Now, drag the if on edge, bounce block and put it inside the forever block.

                  Now, put the control block if,then inside the forever block and snap the sensing block, touching
                  color  in the hexagon of the if loop.
                  Now, create and run the given script.



























                  The butterfly changes colour and size when it touches the colours selected in the touch block.

                  Similarly, you can create scripts with two sprites, and they change colour when they touch each
                  other.
                      DRAWING POLYGONS IN SCRATCH

                  Polygons are 2D shapes with three or more straight lines and angles. Examples of polygons are
                  triangle, square, rectangle, quadrilateral, pentagon, octagon, etc.






                   Equilateral   Square      Pentagon     Hexagon     Heptagon     Octagon     Nonagon      Decagon
                     Triangle    (4 sides)   (5 sides)    (6 sides)   (7 sides)    (8 sides)   (9 sides)   (10 sides)
                    (3 sides)

                  To draw polygons in Scratch, you must remember a few thumb rules. These are as follows:
                      You must know the number of sides of the shape. This is the value to be given in Repeat
                    block. For example, you give Repeat 3 to draw a triangle and 4 to draw a square.

                      Each time a Repeat block is used, you draw a line and turn at a corner.

                      You must know the degree of the angle at the corner. It is very easy to calculate this. Just
                    divide 360 by the number of sides of the shape. For example, to draw a triangle, the turn will
                    be 360/3 (sides of the triangle) = 120.






                    82     iPro (Ver. 4.1)-VI
   79   80   81   82   83   84   85   86   87   88   89