Skip to main content

Turtle Fundamentals

The Python programming language provides a turtle module that can be used to draw things on the screen.

Dependencies

Students need to have these skills before learning this skill:

Goal

When you teach this skill, your goal is to make it so that students can write code that looks like this:

import turtle

turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)
turtle.left(90)
turtle.forward(100)

turtle.done()

Activities

Here are some activities that you can do in order to teach this skill.

Writing on the board

  1. Write this code on the board:

    import turtle

    turtle.forward(100)
    turtle.left(30)
    turtle.forward(100)

    turtle.done()
  2. Ask students what they think that code is going to do.

  3. Have all students copy that code from the board onto their computers.

  4. Have students run the code to see what it does.

  5. Challenge students to edit the code so that it draws a square.