O'Reilly logo

Adventures in Python by Craig Richardson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ch02-pag57

WITH PROGRAMMING IN Python, you can create a huge range of things, from games to scientific data analysis programs, and from 3D modelling tools to robot controllers. In Adventure 1, you learned how to use some basic Python code to make a spaceship command console. Now you’re going to try something a bit more visual.

Creating images with Python is a fun and powerful way to learn how to program. What’s great about it is that you can create complex images with programs that use only a few lines of Python code.

In this adventure, you’ll learn how to use numbers and Turtle Graphics to make drawings with Python. Figure 2-1 shows a drawing made with Turtle Graphics.

image

FIGURE 2-1 An example of a drawing made with Turtle Graphics.

Getting Started with Turtle

In this adventure, you’ll use the turtle module in Python. A module is a set of pre-written and reusable commands that extend what you can do with Python. Recall that you used the time module in Adventure 1 to make ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required