Draw any polygon in Turtle - Python Last Updated : 10 Feb, 2020 Comments Improve Suggest changes Like Article Like Report Prerequisite: Python Turtle Basics Turtle is an inbuilt module of python. It enables us to draw any drawing by a turtle and methods defined in the turtle module and by using some logical loops. turtle drawings are basically drawn using four methods defined in the turtle module. forward(x): moves the turtle(pen) in the forward direction by x unit. backward(x): moves the turtle(pen) in the backward direction by x unit. right(n): rotate the turtle(pen) by n degree in clockwise direction. left(n): rotate the turtle(pen) by n degree in anticlockwise direction. In this article, we will learn how to draw different shaped Polygons using Turtle module. Given the number of sides (n) and length of sides (l), one can easily draw any polygon shape. Let's try to understand it better with the help of examples. Python3 1== # draw any polygon in turtle import turtle # creating turtle pen t = turtle.Turtle() # taking input for the no of the sides of the polygon n = int(input("Enter the no of the sides of the polygon : ")) # taking input for the length of the sides of the polygon l = int(input("Enter the length of the sides of the polygon : ")) for _ in range(n): turtle.forward(l) turtle.right(360 / n) Input : 10 100 Output : Input : 3 150 Output : Input : 4 150 Output : Comment More infoAdvertise with us Next Article Draw any polygon in Turtle - Python I iamjpsonkar Follow Improve Article Tags : Python Python-turtle Practice Tags : python Similar Reads Draw Spiraling Polygon using Turtle in Python Prerequisite: Python Turtle Basic Turtle is an inbuilt module of python. It enables us to draw any drawing by a turtle, methods defined in the turtle module and by using some logical loops. To draw something on the screen(cardboard) just move the turtle(pen). To move turtle(pen) there are some funct 1 min read turtle.get_poly() function in Python he 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.get_poly() This function is used to return the lastly recorded polygon. It do 1 min read Draw an Olympic Symbol in Python using Turtle Prerequisites: Turtle Programming in Python The Olympic rings are five interlaced rings, colored blue, yellow, black, green, and red on a white field. As shown in the below image. Approach:import Turtle moduleset the thickness for each ringdraw each circle with specific coordinates Below is the impl 1 min read Draw a Hut using turtle module in Python Turtle is a inbuilt module in Python, which has many functions like forward(), backward(), right() and left() etc. You can draw a hut on the screen just by using the turtle module in Python. In this article, we will create a hut using the turtle module. Approach: Import turtleSet the background colo 2 min read Draw a car using Turtle in Python Prerequisite: Turtle module, Drawing Shapes There are many modules in python which depict graphical illustrations, one of them is a turtle, it is an in-built module in Python, which lets the user control a pen(turtle) to draw on the screen(drawing board). It is mostly used to illustrate figures, sha 2 min read Like