fbpx
python-turtle-graphics-output

Turtle Basic Graphics Functions

Turtle Basic Graphics Functions

When I think of using a computer to draw, I always think of applications like Adobe Illustrator, Paintshop or CorelDraw. They are great programs, but there are other ways to draw! Who thinks to use Turtle’s basic graphics functions?

Coding and Drawing – Together?

Many programming languages have basic graphic commands that are easy to learn and learning to code usually appeals to most kids.

💥 Kids love graphics!💥

One of the most popular coding languages is Python.

Python is a modular language, so a programmer decides which modules have the necessary commands for their particular app. There are several graphics modules, and the Turtle module is one of them. 

The “turtle” is actually that little arrow that moves around the screen as it draws.  Kids love it because they can watch as their code comes to life on the screen!

Drawing With the Turtle

Although the turtle is limited in its functions, kids can draw many shapes – whatever they can imagine!

Four basic functions move the turtle around: forward, backward, left and right. Turtle “steps” are measured in pixels and directions are in degrees.

Turtle Basic Graphics Functions

Motion Turtle Function
move forward 1 pixel at a timeforward(distance)
move backward 1 pixel at a time backward(distance)
turn left (from 0 to 360 degrees)left(degrees)
turn right (from 0 to 360 degrees) right(degrees)

The great thing about the turtle output screen is that it gives the coder access to all four quadrants in a cartesian coordinate system. This can be a great way to reinforce coordinate math concepts by taking the emphasis off the “math”!

python-turtle-graphics-xy-grid-output

This is the result of a turtle program.  The turtle is shaped like an arrow, so the point always indicates its direction.

Two lines have been drawn to show the horizontal (x) axis (-200, 0) to (200, 0) and the vertical (y) axis (0, 200) to (0, -200). The lines are blue, but the turtle can display any RGB colours the coder wishes.

One of the best advantages of coding is being able to explore and play with built-in functions.

Say What?

The most important part of coding is understanding how and why things work the way they do. Kids need to be asked the right questions to help them understand how a function works.

turtle-basic-graphics-functions-examples

They also have to find out why it won’t work, and this means testing ‘bad’ code to understand the code rules.

turtle-basic-graphics-functions-error-questions

Coding intrinsically promotes computational thinking and problem-solving. This is more important than learning the functions!

I have a resource if you’re interested in teaching turtle graphics. It includes answer keys as well as lessons with teacher notes. Click here.

You can also buy the full unit (which includes two tests) here.

More Graphics Ideas!

Graphics, by themselves, are fun, but find out what happens when you loop them!

More Resources