Part 7: Draw a Flower
REMIX “Orientation – version 3” and rename it as “Orientation – version 4”. In this part of the tutorial, you will program the turtle agents to draw a flower when the user clicks the “forever” button.
Click on the “Turtle” tab to switch to the “Turtle” page. The Turtle agents will run the programs you create here.
Now it is your task to put the blocks together into a procedure that the turtle agents will each draw a circular flower petal when the forever button is toggled on. (A toggle is like a light switch, it is either on or off.)
Let’s review what the blocks do:
The “when toggled” block on the Turtle Page tells the turtles what to do when the “forever” button is toggled to the ON position.
The “pen down” block tells each turtle agent to leave a trail wherever it goes.
The “forward” block moves the agent forward.
The “left by __degrees” block tells each turtle to turn left by some number of degrees.
Try combining the blocks so that when the forever button is pushed, each of the five turtles draws a petal of the flower.
After making changes to you program, always click “Save” to save your changes. Always click “Run Code” before running your project.
Check Your Progress: Scroll back down to Spaceland, and click the “Forever” button. You should see a set of white blocks (the agents you created) drawing a flower.
Congratulations! Your turtle agents drew a flower!
Save your “Orientation – version 4” project in your public gallery.
Copy the URL of your “Orientation - version 4” project then paste it in the discussion area below.
This is a companion discussion topic for the original entry at http://studio.code.org/s/sciencePD/stage/11/puzzle/7