turtle.mode() function in Python
The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support.
This function is used to set turtle-mode (‘standard’, ‘logo’ or ‘world’) and perform reset.
Syntax : turtle.mode(mode=None)
mode: one of the strings ‘standard’, ‘logo’ or ‘world’
- Mode ‘standard’ is compatible with turtle.py.
- Mode ‘logo’ is compatible with most Logo-Turtle-Graphics.
- Mode ‘world’ uses userdefined ‘worldcoordinates’.
Below is the implementation of the above method with some examples :
Example 1 :
Example 2 :