Page 79 - iPlus_Ver_2.0_class_6
P. 79

Equilateral Triangle          Square                  Pentagon                  Hexagon
                          (3 sides)                (4 sides)                (5 sides)                (6 sides)








                         Heptagon                  Octagon                 Nonagon                   Decagon
                          (7 sides)                (8 sides)                (9 sides)               (10 sides)

                 To draw polygons in Scratch, you must remember a few thumb rules. They are:
                 •   You must know the number of sides in 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 command 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 in the shape. For example, to draw a triangle, the turn will
                   be 360/3 (sides of the triangle) = 120.

                 Look at these polygons can be made using repeat.

                  i +  DRAWING A SQUARE

                 To draw a square in scratch, arrange the blocks as shown below.
































                    Info Byte
                     A loop is a process that instructs a computer to repeat a set of commands for a specified
                     number of times.






                                                                                                                  77
                                                                           Scratch Programming—Game Creation
   74   75   76   77   78   79   80   81   82   83   84