Hello,
I was just playing with the turtle module, and thought it was an
interesting way to augment the introduction to python (I teach
college students, who haven't had any programming). It's a great way
to introduce functions, for-loops, and general program structures.
After a bit of playing, I realized that I couldn't think of many
examples which use turtle with conditional structures (if- and while-
statements), or functions that return values, as opposed to
"procedures" like:
def square(length):
forward(length)
right(90)
forward(length)
right(90)
forward(length)
right(90)
forward(length)
right(90)
If-statements could possibly be used with some sort of random
behavior (if rand()<0.5 ...). Are there any other situations, using
turtle, that these structures would be natural?
thanks,
Brian Blais
--
Brian Blais
bbl...@bryant.edu
http://web.bryant.edu/~bblais
--
http://mail.python.org/mailman/listinfo/python-list