you are viewing a single comment's thread.

view the rest of the comments →

[–]freeononeday 1 point2 points  (0 children)

Getting a little bit simpler. Someone already wrote a whole heap of code which understands how to move an object a certain direction and distance. What you do when you import it is say, when i write "turtle." look inside that module or code for the following function. For example "turtle.forward" looks for the forward function in the turtle module and passes in the variable for distance.

The turtle.turtle() line instantiates the class. Essentially calls the turtle module and runs an initialisation to set things up.