beanz Magazine

Who Knew Turtles Can Draw?

Nicholas Labyrinth X on Flickr

Meet Thomas, a turtle who can help you draw stars with Python (not the snake!).

If you’ve ever drawn a star before — or even doodled one in your notebook — you probably realized that it’s harder than it looks. My stars always look titled and squishy. Inevitably, one of the star’s points is way too long, and another point looks like a sad little stump. Well, luckily for us technical folk, there’s an easier way to draw perfect stars: using Python and Turtle.

Pythons and Turtles

Python is a simple, flexible programming language that allows you to focus on logic instead of worrying about brackets and semi-colons. Turtle is a Python module — sort of like an extension to the main language — that makes it easy to draw things.

There are two main components in a Turtle program. There’s the ‘screen’, or the canvas on which you draw. Then there’s the turtle, who wanders around the screen with an imaginary pen, drawing the shapes we request. Of course, this is virtual turtle! Often he (or she) is shaped liked a little triangle, but we can change this if we like.


Become a subscriber and get access to the rest of this article. Plus all our magazine articles.

Stories also include numerous links to help parents, kids, and teachers learn more. Get access today at just $15 per year!

Subscribe Today!

Also In The August 2017 Issue

A substitution cipher is an easy way to begin learning about how to use and make secret codes.

Scratch is a fun block-based programming language that's easy to learn once you understand the basics.

The micro:bit is a not too expensive board that lets you easily build projects to learn about computing.

The humble sewing machine can be a great first step to fun maker projects. Here's how to get started!

There's lots you can do make your online experiences enjoyable AND safe.

Minecraft is a fun game to play and a way to learn about games and programming. But first you have to learn the basics.

Have you ever put books in alphabetical order? What do you think the best method of alphabetizing would be?

Some ideas how to engage young women in computing and STEAM based on recent research.

These three dimensional objects are 3D printed and cast images when light shines through them.

How do computers predict what text you want to write next? Here's how to create predictive stories.

Links from the bottom of all the August 2017 articles, collected in one place for you to print, share, or bookmark.

Interesting stories about computer science, software programming, and technology for February 2017.