Let's put everything we've learned about loops into practice by creating a program that
draws a spiral pattern.
Project Description
Create a Scratch project that uses a loop to draw a spiral pattern. The spiral should start
small and gradually get larger.
Step-by-Step Guide
1 Start a new Scratch project and choose the "Pen" extension.
2 Add a "when green flag clicked" block to start your script.
3 Add a "clear" block to erase any previous drawings.
4 Add a "pen down" block to start drawing.
5 Create a variable called "length" and set it to 0 at the start.
6 Use a "repeat" loop to create the spiral. Experiment with the number of repetitions.
7 Inside the loop, add blocks to move forward, turn, and increase the length.
Example Code Structure
when green flag clicked
clear
pen down
set [length] to (0)
repeat (100)
move (length) steps
turn (90) degrees
change [length] by (2)
Challenge
Can you modify the project to create different spiral shapes? Try changing the turn angle
or the rate at which the length increases. Can you make the spiral change colors as it draws?
Remember, creativity is key! Feel free to experiment with different patterns and shapes.
Don't forget to share your project with your classmates when you're done!