« Back to Main Page

Activity:AppLab/Turtle Drawing

From Bold Idea Knowledgebase
A robotic turtle

Imagine you have a robotic "turtle" whose purpose is to draw pictures. It has a pen attached to its tail that can lift up and down. It also knows a few commands like "turn left", "turn right", and "move forward". How might you get this turtle to draw a square or a triangle?

Give it a try in App Lab. If you haven't set up your app lab account yet, look in the Getting Started section for instructions.

Under the Toolbox, click "Turtle" to bring up the turtle commands.

Applab-toolbox-turtle.png

Your task is to draw either a square or a triangle using the turtle. You'll need to use some combination of the following blocks to write the algorithm that drives the turtle to draw your shape:

Applab-turtle-penup-pendown.png

Applab-turtle-moveforward.png

Applab-turtle-turnleft-turnright.png


When you use the moveForward(pixels) block, you'll want to replace "pixels" with the distance (in pixels) you want the turtle to drive. Pixels are tiny dots that make up everything you see on your screen.

When you use the turnLeft(angle) , turnRight(angle) blocks, you'll need to replace "angle" with the angle you want the turtle to turn.

Here are the dimensions and angles you'll be using for each shape:


Square-triangle-specs.png