Basic HTML Version

|  | Table of Contents |  | View Full Version

Page 107 - 2609_Logiccode
P. 107

    Step  2    Drag a         set pen color to         block into the scripts area.

                     Step  3    Drag a         set pen size to 5   block into the scripts area and change

                               the size to 5.

                     Step  4    Drag a         pen down       block.
                     Step  5    Drag on move 10 steps block and change it to  move 50             steps .

                     Step  6    Now, drag       Change pen color         by 10   block to change the pen colour.

                     Step  7    Then again, move 50 steps by dragging the move 10 steps block and change it to
                                move 50      steps .

                     Step  8    Change the pen colour again by using the           Change pen color         by 10
                               block.

                     Step  9    At last, move 50 steps by dragging the move 10 steps block and changing

                               the steps to  move 50       steps .

                     Step 10   Click the green flag at the top right corner of the stage to run your program.

                        when    clicked
                             set pen color to
                             set pen size to     5

                             pen down
                        move     50  steps

                           Change pen     color    by 10
                        move     50  steps
                           Change pen     color    by 10

                        move     50  steps

                               DRAWING SHAPES USING CONTROL BLOCKS

                     The shapes can also be drawn using different Control blocks.

                     REPEAT BLOCK

                     If you want to repeat a block of code a fixed number of times, the Repeat block is used.
                     With the Repeat block, you can draw Polygons. Examples of polygons are triangle, square,
                     pentagon, hexagon, heptagon, octagon, nonagon, decagon, etc.

                                                                                                     Shapes in Scratch  105

| 102 103 104 105 106 107 108 109 110 111 112 |