turtle.turtlesize() function in Python Last Updated : 26 Jul, 2020 Comments Improve Suggest changes 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 Interview Preparation For Software Developers D deepanshu_rustagi Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads Interview PreparationInterview Preparation For Software DevelopersMust Coding Questions - Company-wise Must Do Coding Questions - Topic-wiseCompany-wise Practice ProblemsCompany PreparationCompetitive ProgrammingSoftware Design-PatternsCompany-wise Interview ExperienceExperienced - Interview ExperiencesInternship - Interview ExperiencesPractice @GeeksforgeeksProblem of the DayTopic-wise PracticeDifficulty Level - SchoolDifficulty Level - BasicDifficulty Level - EasyDifficulty Level - MediumDifficulty Level - HardLeaderboard !!Explore More...Data StructuresArraysLinked ListStackQueueBinary TreeBinary Search TreeHeapHashingGraphAdvance Data StructuresMatrixStringAll Data StructuresAlgorithmsAnalysis of AlgorithmsSearching AlgorithmsSorting AlgorithmsPattern SearchingGeometric AlgorithmsMathematical AlgorithmsRandomized AlgorithmsGreedy AlgorithmsDynamic ProgrammingDivide & ConquerBacktrackingBranch & BoundAll AlgorithmsProgramming LanguagesCC++JavaPythonC#Go LangSQLPHPScalaPerlKotlinWeb TechnologiesHTMLCSSJavaScriptBootstrapTailwind CSSAngularJSReactJSjQueryNodeJSPHPWeb DesignWeb BrowserFile FormatsComputer Science SubjectsOperating SystemsDBMSComputer NetworkComputer Organization & ArchitectureTOCCompiler DesignDigital Elec. & Logic DesignSoftware EngineeringEngineering MathematicsData Science & MLComplete Data Science CourseData Science TutorialMachine Learning TutorialDeep Learning TutorialNLP TutorialMachine Learning ProjectsData Analysis TutorialTutorial LibraryPython TutorialDjango TutorialPandas TutorialKivy TutorialTkinter TutorialOpenCV TutorialSelenium TutorialGATE CSGATE CS NotesGate CornerPrevious Year GATE PapersLast Minute Notes (LMNs)Important Topic For GATE CSGATE CoursePrevious Year Paper: CS exams Like