Page 91 - TGPT_V5.0_C4_Flipbook
P. 91

Look at these polygons that can be made using Repeat.

                                    Polygon                                   Command

                          Hexagon                       Repeat 6 Move 100 Steps Turn 60 degrees
                          (6 Sides)
                          Heptagon                      Repeat 7 Move 100 Steps Turn 51 degrees
                          (7 Sides)

                          Octagon                       Repeat 8 Move 100 Steps Turn 45 degrees
                          (8 Sides)

                          Nonagon                       Repeat 9 Move 100 Steps Turn 40 degrees
                          (9 Sides)
                          Decagon                       Repeat 10 Move 100 Steps Turn 36 degrees
                          (10 Sides)


                 Drawing a Hexagon in Scratch


                 To draw a hexagon in Scratch, arrange the blocks as shown below.







                                                                                                  Hintbot

                                                                                     If  you  enter  the  wrong  value
                                                                                     in turn block, you'll get wrong
                                                                                     shape.




                 You can also create different shapes by adjusting the degree and number of steps in the code.


                           Timeline


                            The blocks that are used to control the movement of a sprite are known as Motion
                          blocks.
                            The blocks that are used to control the appearance of a sprite are known as Looks
                          blocks.
                            The blocks that are used to control the sound functions of a sprite are known as Sound
                          blocks.

                            The blocks that are used to control how the blocks in a script will start to run if a particular
                          action is done are known as Events blocks.
                            The value of x gives the horizontal (left to right) location of the sprite. The value of y gives the
                          vertical (top to bottom) location of the sprite.





                                                                                              More Blocks in Scratch  89
   86   87   88   89   90   91   92   93   94   95   96