turtle.turtlesize() function in Python Last Updated : 26 Jul, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report 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.turtlesize() This function is used to return or set the pen's attributes x or y-stretchfactors and outline. Syntax : turtle.turtlesize(stretch_wid=None, stretch_len=None, outline=None) Parameters: ArgumentsValue TypeDescriptionstretch_widpositive numberstretchfactor perpendicular to orientationstretch_lenpositive numberstretchfactor in direction of turtles orientationoutlinepositive numberdetermines the width of the shapes's outline Below is the implementation of the above method with some examples : Example 1 : Python3 # import package import turtle # set turtle turtle.speed(1) turtle.shape("turtle") turtle.fillcolor("blue") # loop for motion for i in range(4): # set turtle width turtle.turtlesize(stretch_wid=(i+1)*0.5) turtle.forward(100) turtle.right(90) Output : Example 2 : Python3 # import package import turtle # set turtle turtle.speed(1) turtle.shape("turtle") turtle.fillcolor("blue") # loop for motion for i in range(4): # set turtle length turtle.turtlesize(stretch_len=(i+1)*0.5) turtle.forward(100) turtle.right(90) Output : Example 3 : Python3 # import package import turtle # set turtle turtle.speed(1) turtle.shape("turtle") turtle.fillcolor("blue") # loop for motion for i in range(4): # set turtle outline turtle.turtlesize(outline=i+1) turtle.forward(100) turtle.right(90) Output : Example 4 : Python3 # import package import turtle # set turtle turtle.speed(1) turtle.shape("turtle") turtle.fillcolor("blue") # loop for motion for i in range(4): # set turtlesize properties all together turtle.turtlesize(stretch_wid=(i+1)*0.5, stretch_len=(i+1)*0.5, outline=(i+1) ) turtle.forward(100) turtle.right(90) Output : Comment More infoAdvertise with us Next Article turtle.write() function in Python D deepanshu_rustagi Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads turtle.showturtle() 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.showturtle() This method is used to makes the turtle visible. It doesn't req 1 min read turtle.Screen().turtles() 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.Screen().turtles() This function is used to return the list of turtles on th 1 min read turtle.write() function in Python turtle module in Python provides a way to create graphics and animations using Tkinter. The turtle.write() method is used to display text at the turtleâs current position on the canvas. This function helps in labeling graphics, adding instructions or displaying values dynamically. It allows both obj 3 min read turtle.tilt() 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.tilt() This function is used to rotate the turtleshape by the angle from its 1 min read turtle.tracer() 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.tracer() This function is used to turn turtle animation on or off and set a 1 min read turtle.reset() 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.reset() This function is used to delete the turtle's drawings and restore it 1 min read Like