On Nov 29, 2009, at 17:51 , Edward Cherlin wrote:

If you use the Python-programmable tile in Turtle Art in Sugar, or
Smalltalk in the Turtle Graphics in Etoys, it's even better.

I'll have to check this out.

sequences, where I can use a conditional to stop when the turtle would
go off the screen.

ah, good idea.

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)

Surely you mean

repeat(4)
   forward(length)
   right(90)


surely I don't mean.  :)

that's not python.  I'd do:

def square(length):
    for i in range(4):
        forward(length)
        right(90)

but there isn't much difference with such a simple shape. obviously, as one continued, the for-loop method would be clearer.



If-statements could possibly be used with some sort of random behavior (if
rand()<0.5 ...).

Drunkard's Walk.


yes, that was the kind of thing I was thinking about.


        thanks!

                bb


--
Brian Blais
bbl...@bryant.edu
http://web.bryant.edu/~bblais



_______________________________________________
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to