[Python] TurtleWorld Help

Started by
4 comments, last by Oluseyi 16 years, 2 months ago
I got TurtleWorld, for one of the things in the book called "thinking like a computer scientist". I downloaded it, and extracted it into my Lib folder. I can import it and all that, but when I type bob = Turtle() it opens, and has a red turtle in the middle, I press it and it just freezes with a white screen and says 'TurtleWorld (Not Responding). Help please?
Advertisement
Could you explain a little more about what you're expecting to happen? And what you're pressing, what you're trying to achieve, etc. I don't think many people here are familiar with TurtleWorld.
Quote:Original post by X Jado X
but when I type bob = Turtle()


Type it where? Some graphical APIs don't play nice with IDLE. (I've even had problems in IDLE with Tkinter stuff, which is part of the standard library.) You might try plain old 'python' at the command line if that's it.
When I type it in the IDLE program, it pops up, but when I go to press on the TurtleWorld thing that comes up, it just does the freezing thing..
Bump, someone please help, I can't continue learning >_>
Clearly you are not following the instructions. I did a Google search and this was the second result; scroll down the page and you'll see the Turtle examples - and you'll see that the proper way to call the Turtle constructor is:
bob = Turtle(world)


By not passing in the world parameter (and I don't know what type of object it is; you're the one reading the book), you cause the Turtle instance to behave inappropriately. It's disappointing that there isn't error checking for this sort of thing, but it's also understanding since this is an instructional program and should have been run exactly as intended to illustrate various concepts.

Re-read the chapter and follow the code exactly.

This topic is closed to new replies.

Advertisement