Home
Project Folders
Teacher Resources
Student Resources
En ESPAÑOL
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

squares 1 2 3 4 5 6 7
Squares 4
Try It
22 KB


Goal:   Draw squares of different sizes, colors, and thicknesses using sliders.


Screenshot


Code
Project Map

code


Notes

We can control other qualities of a square with sliders:

  1. Make a new slider called whatcolor.   Set its minimum to 0 and its maximum to 140.   (There are 140 colors in MicroWorlds.   This slider will be used to set the turtle's pen color.)

  2. Make another slider called howthick.   Set its minimum to 1 and its maximum to 100.   (This slider will be used to set the thickness of the turtle's pen.

  3. In the square procedure, setc whatcolor sets the turtle's color to the number on the whatcolor slider.

  4. Setpensize howthick sets the turtle's pen size to the number on the howthick slider.

  5. Now you can change the values on one, two, or all three sliders before clicking the square button.




What If?
Try setting the sliders to different numbers.


Challenge
Drag the turtle to different positions to create a scene out of squares.




© copyright 2001 - 2008  OpenWorld Learning.   All rights reserved.