eToys Projects, Feb 29, 2012, Cardinal Forest Elementary School
Go to Assignment part 2 for this lab, after finishing this part:
- Spirals eToys - eToys draws this spiral so fast, it may look like nothing is happening. Try clearing the screen first.
Steps to build this program:
-
Create a variable:
Type in a name for this variable, use "sidelength":
- To draw the square we need the 'repeat' block from 'miscellaneous' and the 'forward' and 'turn' blocks from 'basic'.:
- Use the 'sidelength' variable for how far to move forward. Repeat 4 times to draw a square:
- Use the 'basic' and 'pen use' menus for the blocks used in a clearScreen script::
- Start with an "empty script" to begin building the draw spiral script:
- In the "drawSpiral" script
- use the "clearScreen" block,
- start the sidelength variable at 20
- Use another repeat block to draw 40 squares
- In the Repeat block, use a drawSquare block to draw each square
- In the Repeat block, increase the sidelength by 5 after each square is drawn.
This is how a variable can be used.
- Go To Assignment for this lab.