Jump to content
  • Advertisement
Sign in to follow this  
X Jado X

[Python] TurtleWorld Help

This topic is 3823 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!