On 01/31/2014 10:38 PM, Alan Gauld wrote:
If you want multiple turtles you should use
the first version.
Yes, the turtle module has a global turtle that can be used by people playing
with a single turtle, and prefere conventional procedural programming style,
rather than object-oriented (OO).
On 31/01/14 10:09, Ian D wrote:
Hi
Another quickie.
I can create turtle objects (if that's the correct terminology) using 2
different ways, both work.
t1 = turtle.Turtle()
or
t2 = turtle
But which is the best practice... and why?
import turtle
t1 = turtle.Turtle()
This creates an ins
Hi
Another quickie.
I can create turtle objects (if that's the correct terminology) using 2
different ways, both work.
t1 = turtle.Turtle()
or
t2 = turtle
But which is the best practice... and why?
import turtle
t1 = turtle.Turtle()
t2 = turtle
t1.fd(100)
t2.goto(-100,100)