Python and Turtle custom functions,Difficulty Level 3,for loop,loop Sixteen-Petal Flower with Python Turtle

Sixteen-Petal Flower with Python Turtle

Knowing how to draw a football shape, draw a sixteen petal flower with loop and custom function.

16-Petal Flower with Python Turtle

Code:

import turtle
turtle.title('Sixteen Petals - PythonTurtle.Academy')
turtle.setworldcoordinates(-2000,-2000,2000,2000)

def draw_football(x,y,tilt,radius):
    turtle.up()
    turtle.goto(x,y)
    turtle.down()
    turtle.seth(tilt-45)
    turtle.circle(radius,90)
    turtle.left(90)
    turtle.circle(radius,90)

for tilt in range(0,360,30): 
    draw_football(0,0,tilt,1000)

Related Post