0% found this document useful (0 votes)
38 views

Scratch Turtle Tutorial: Paint A New Sprite

The document provides instructions for creating a Scratch Turtle tutorial that allows the user to draw different polygons based on a variable for the number of sides. Key steps include using a repeat block with a variable to set the number of sides, dividing by the sides variable to calculate the turn degrees, and adding start and clear buttons to control the turtle script.

Uploaded by

Trenton Taylor
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Scratch Turtle Tutorial: Paint A New Sprite

The document provides instructions for creating a Scratch Turtle tutorial that allows the user to draw different polygons based on a variable for the number of sides. Key steps include using a repeat block with a variable to set the number of sides, dividing by the sides variable to calculate the turn degrees, and adding start and clear buttons to control the turtle script.

Uploaded by

Trenton Taylor
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Scratch Turtle Tutorial

Paint a new sprite

Use the scissors to delete the cat

Paint a new sprite, perhaps a turtle

Shrink the sprite

Click on the blocks to get the turtle to draw a square. How many times did you click to make a square? Change the values in move and turn to make a triangle. How many times did you click to make a triangle? 360 divided by 90 = 4, a square has 4 sides. How would you calculate the number of degrees to turn for a 3 sided shape? How would you calculate the number of degrees to turn for an octagon?

Add a clear block found in the Pen Palette

How is the behaviour different when the clear block is separate from the rest of the blocks?

Add a repeat block with the value 4 and click the block

Now change the values in repeat turn to make a triangle.

We can see that repeat and degrees determines the number of sides and move determines the size. Lets make it more flexible so we dont have to change the numbers. To do this we will create a variable for the number of sides.

Set sides to 4 and drag the sides variable into the repeat block. So far this is not very useful but how can we use this variable to set the number of degrees to turn?

Drag a divide operator block from the Operators palette Now you can create different polygons by entering the number of sides.

Lets find a better way to get the number of sides. Drag ask to ask a question and answer from the sensing palette and click the block to see what happens.

Now switch to presentation mode

This is not very useful because you cant access your code. How can we start and clear? Where can we get user input from? Answer, keyboard and mouse.

From the Control palette drag a when block to control when it starts. Now switch to presentation mode and try it.

To make it more user friendly lets make a clear and start button.

Create a new sprite by importing a button then edit the costume to add the text clear.

Now add a simple script to run clear when the sprite is clicked The start button is a bit more complicated because you have send a message from the start sprite to the turtle sprite to get the turtle script to run. Use broadcast new type start.

Now go back to the turtle script and add a when I receive control block to the top of your script. This will receive the start signal when the Start button is clicked.

You might also like