some turtle questions
Brian Blais
bblais at bryant.edu
Sun Jan 24 10:29:20 EST 2010
Hello,
I am trying to think of things to do with the turtle module with my
students, and I have some ideas where I am not sure whether the
turtle module can do it.
1) is there a way to determine the current screen pixel color? I am
thinking about having the turtle go forward until it reaches an
object, say a red circle. I can probably do this by making circle
objects (drawn with turtles themselves) which know their own
position, and check against this info. But I thought it might be
useful also for the turtle to know.
2) is there a way to put a limit on the extent the turtle can
travel? it seems I can keep moving off of the screen. Is there a
way to make it so that a forward(50) command, at the edge, either
raises an exception (at the wall) or simply doesn't move the turtle
because of the limit?
thanks!
bb
--
Brian Blais
bblais at bryant.edu
http://web.bryant.edu/~bblais
http://bblais.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100124/c05add60/attachment.html>
More information about the Python-list
mailing list