Replies To: Turtle Graphics

Re: Turtle Graphics

Posted 28 August 2008 - 06:15 PM

You, um, made a square.

On of the most impresive learning tools I've seen in a long time is the Turtle Art program that comes with the OLPC machine. It uses interlocking code elements to show the student the basics of procedural programming.

I taught Terrapin Logo to kids grades second through fifth, many many years ago. The second graders started with squares.

Re: Turtle Graphics

from turtle import *
speed("fastest")
color("blue")
down()
for i in range(36):
for j in range(10):
forward(50)
right(36)
right(10)
up()

Also, I'm not fond of goto. It breaks the metaphor of a turtle taking some steps, dipping it's tail in paint, picking it up and putting it down. What does a turtle know of x and y? It only need know move and turn. Here's a cube without goto, by way of example: