Scratch Projects, Feb 29, 2012, Cardinal Forest Elementary School

Go to Assignment part 2 for this lab, after finishing this part:

  1. Draw a spiral of squares shapes: press 's'

    Steps to build this program:

  2. Create a variable:

    Type in a name for this variable, use "sidelength":

    Drag out a "set sidelength" block

  3. We're writing a program to draw these variable length squares:

  4. Create a broadcast message inside a repeat block. Name the message "drawSquare":

  5. Create blocks to receive this broadcast message to draw a square:

  6. Use the variable "sideLength" in the drawSquare program block:

  7. In the broadcasting block, you want to change the sidelength by 5 each time you draw the square. This is a variable:

  8. Activate this script of blocks when an 's' is pressed on the keyboard:

    Notice how the variable of the variable "sidelength" has changed. Why?

  9. Create blocks to clear the screen. Send a broadcast message "clearScreen":

  10. Here's the entire program of blocks:

  11. Go To Assignment for this lab.