turtle.title() 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.
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 turtle
sc = turtle.Screen()
sc.setup( 400 , 300 )
|
Output :
Example 2 :
Python3
import turtle
sc = turtle.Screen()
sc.setup( 400 , 300 )
turtle.title( "Turtle Window For GFG" )
|
Output :
Last Updated :
26 Jul, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...