April 2024
Beginner to intermediate
500 pages
24h 20m
English
The turtle is not limited to the triangular shape you see by default, but instead can appear as a turtle or any other shape that you can draw with the turtle. In addition, you can use a GIF file to provide the turtle with a shape. Once you have added a shape to your program, any turtle can use that shape by name.
addshape(name, shape=None) Add a new shape to the TurtleScreen’s shape list. A shape must be registered before being used. This method is called using a screen object or the turtle module name. The arguments are interpreted as follows:
If name is the name of a GIF file and shape is None, the image is registered.
If name is a string and shape is a tuple of pairs of coordinates, then the tuple ...
Read now
Unlock full access