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.
turtle.title()
This function is used to set the title of turtle-window. It requires only one argument as “titlestring” a string, to appear in the titlebar of the turtle graphics window. In other words, it is a string to display the title of the turtle window. By default title of the turtle graphics window is “Python Turtle Graphics”.
Syntax :
turtle.title()
Below is the implementation of the above method with some examples :
Example 1 :
Python3
# import package import turtle # make turtle object # and set size sc = turtle.Screen() sc.setup( 400 , 300 ) |
Output :
Example 2 :
Python3
# import package import turtle # make turtle object # and set size sc = turtle.Screen() sc.setup( 400 , 300 ) # set turtle screen title turtle.title( "Turtle Window For GFG" ) |
Output :