Draw Star Using Turtle Graphics-Python Last Updated : 29 Apr, 2025 Comments Improve Suggest changes Like Article Like Report Python's Turtle module offers a fun and interactive way to create graphics by controlling a turtle (pen) to draw on the screen. In this article, we will learn how to use Turtle to draw a simple star. Some commonly used methods are:forward(length) moves the pen in the forward direction by x unit.backward(length) moves the pen in the backward direction by x unit.right(angle) rotate the pen in the clockwise direction by an angle x.left(angle) rotate the pen in the anticlockwise direction by an angle x.penup() stop drawing of the turtle pen.pendown() start drawing of the turtle pen.Steps to Draw a Star Let’s go through these steps to implement this in Python:First import turtle module in the idle or editor you are using.import turtleGet a screen board on which turtle will draw.ws=turtle.Screen() A screen like this will appear:-Define an instance for turtle.For a drawing, a Star executes a loop 5 times.In every iteration move the turtle 100 units forward and move it right 144 degrees.This will make up an angle 36 degrees inside a star.5 iterations will make up a Star perfectly.Below is the python implementation of the above approach. Python import turtle scr = turtle.Screen() t = turtle.Turtle() for i in range(5): t.forward(100) t.right(144) OutputTurtle making a starExplanation:turtle.Screen() creates the drawing window for the turtle.t = turtle.Turtle() creates the turtle object, which will act as the pen for drawing.For loop runs 5 times, with t.forward(100) moving the turtle 100 units forward and t.right(144) turning it by 144 degrees to draw the star's points.Let’s draw a more colorful and styled version of the star using a color list and pen positioning. Python import turtle scr = turtle.Screen() clr = ['red', 'green', 'blue', 'yellow', 'purple'] turtle.pensize(4) turtle.penup() turtle.setpos(-90, 30) turtle.pendown() for i in range(5): turtle.pencolor(clr[i]) turtle.forward(200) turtle.right(144) turtle.penup() turtle.setpos(80, -140) turtle.pendown() turtle.pencolor("black") turtle.done() OutputTurtle making a starExplanation:Initializes the drawing window with turtle.Screen() and sets the pen size to 4. The pen is moved to position (-90, 30).For loop runs 5 times, changing the pen color with turtle.pencolor(clr[i]) and drawing each point using turtle.forward(200) and turtle.right(144).After the star, the pen moves to (80, -140) and changes color to black with turtle.pencolor("black"). Python program to draw star using turtle graphics Comment More infoAdvertise with us Next Article Company Preparation T taran910 Follow Improve Article Tags : Python Python Programs 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