Turtle Graphics

8 Topics | 1 Quiz
Data Types and Variables

7 Topics | 1 Quiz
Loops

7 Topics | 1 Quiz
Conditions

6 Topics | 1 Quiz
In this topic, you will learn how to draw a square using turtle graphics.

Follow the instructions below to draw a square.

INSTRUCTIONS:

- In the IDE to the right, you can see the lines that have ‘
**forward**‘ and the lines that have ‘**left**‘? - In the brackets next to the forward put the number
**100**in-between i.e.**turtle.forward(100)** - In the brackets next to the left write the number
**90**in-between i.e.**turtle.left(90)** - Click the Run button

That is one way of drawing a square.

The line** turtle.forward** draws a line the length of whatever number is in its brackets. Meanwhile, the **turtle.left **turns the arrow whatever number of degrees that is in-between its brackets

For our square the length is 100 and the angles are 90 degrees.

Try and draw a rectangle. What would the length be? Would the angles still be the same? Edit the code above and click RUN to see if you get it right.

Login

Accessing this course requires a login. Please enter your credentials below!