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 functions i.e forward(), backward(), etc.
Approach to draw a Spiraling Polygon of the given sides and of size n:
- Import turtle and create a turtle instance.
- Set sides = 5, sides of the polygon.
- Using for loop(i = 0 to i < n * sides) and repeat below step
- turtle.forward(i * 10).
- turtle.right(360 / sides).
- Close the turtle instance.
Below is the implementation:
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.
- Draw Spiraling Star using Turtle in Python
- Draw Spiraling Square using Turtle in Python
- Draw Spiraling Triangle using Turtle in Python
- Draw any polygon in Turtle - Python
- Draw Circle in Python using Turtle
- Draw Cube and Cuboid in Python using Turtle
- Draw Shape inside Shape in Python Using Turtle
- Draw Colored Solid Cube using Turtle in Python
- Draw Panda Using Turtle Graphics in Python
- Draw Heart Using Turtle Graphics in Python
- Draw Ellipse Using Turtle in Python
- Draw Graph Grid Using Turtle in Python
- Draw Dot Patterns Using Turtle in Python
- Draw Chess Board Using Turtle in Python
- Draw an Olympic Symbol in Python using Turtle
- Draw Black Spiral Pattern Using Turtle in Python
- Draw a car using Turtle in Python
- Draw a snowman using turtle module in Python
- Draw Spiralling Circles Using Turtle Graphics in Python
- Draw house using Turtle programming in Python
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.