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
-
Write this code on the board:
import turtle
turtle.forward(100)
turtle.left(30)
turtle.forward(100)
turtle.done() -
Ask students what they think that code is going to do.
-
Have all students copy that code from the board onto their computers.
-
Have students run the code to see what it does.
-
Challenge students to edit the code so that it draws a square.