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 write text at the current turtle position.
turtle.write(arg, move=False, align=’left’, font=(‘Arial’, 8, ‘normal’))
|arg||Info, which is to be written to the TurtleScreen|
|align||One of the strings “left”, “center” or right”|
|font||A tuple (fontname, fontsize, fonttype)|
Below is the implementation of the above method with some examples :
Example 1 :
Example 2 :
Example 3 :
Example 4 :
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.