July 23, 2011

Cracking the Code on Logo

In elementary school, we had about 4 or 5 ancient Apple II/e computers, which were used to keep kids busy if they finished tests early, or for running the LOGO program. While many of you may remember LOGO, for the younger set, it entailed a triangle shaped "Turtle" that performed the actions you told it, including going forward a certain number of spaces, rotating a certain number of degrees, and so on. If LOGO was programmed correctly, you could make all matter of designs.

Our science teacher at one point gave us a simple task - to make a perfect right triangle with LOGO. A lot of people came close, but it was hard for our elementary school brains to tell the turtle to draw a line that was precisely the right length hypotenuse. A few decimals here and a few decimals there, but nobody quite got it.

Then I realized we were doing it the hard way. I told the turtle to go forward 30 (a standard measure), turn right 90 degrees, go forward another 30, making the two straight edges, and then entered the command of HOME, which made the turtle do it all by itself. I then hit HT (which hid the turtle) and on the screen was that perfect right triangle. The science teacher was annoyed, but had to admit I had cracked the code.

/via My Google+ Profile.

No comments:

Post a Comment