Introduction
Turtle is a Python module that comes pre-installed. It allows you to draw using a screen (cardboard) and a turtle (pen). We must move the turtle to draw something on the screen (pen). Some functions, such as forward() and reverse(), can be used to move the turtle.
Steps to create a spiraling star using turtle
- Create a turtle instance by importing a turtle.
- Use for loop(i=0 to i<n) and repeat below step:
- turtle.forward(10*i)
- turtle.right(144)
- Close the turtle instance.
Python implementation
# importing turtle module to create a spiraling star using turtle
import turtle
# creating instance of turtle
n = 15
pen = turtle.Turtle()
# Main code to create a spiraling star using turtle
# loop to draw a side
for i in range(n):
# drawing side of length i*10
pen.forward(i * 10)
# changing direction of pen by 144 degree in clockwise
pen.right(144)
# closing the instance
turtle.done()
# You will get spiraling star using turtle as an output
Output

You can practice by yourself with the help of online python compiler for better understanding.
You can also read about Palindrome Number in Python here.




