VOOZH about

URL: https://www.geeksforgeeks.org/python/draw-a-flower-using-turtle-in-python/

⇱ Draw a Flower using Turtle in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Draw a Flower using Turtle in Python

Last Updated : 15 Jul, 2025

We are given the task of drawing a flower using Turtle Graphics in Python. Our goal is to create a design that looks like a flower with multiple petals arranged in a circular pattern. We will do this by using loops to repeat the petal shape and turtle commands to draw and rotate the petals, forming a complete flower.

Steps to draw a flower:

  • Import the turtle module: We'll need the turtle module to access its commands.
  • Set the speed of the turtle: Adjust the speed of the turtle to make the drawing process faster.
  • Draw the flower petals: We will use loops to draw multiple petals to form the flower shape.
  • Add color: We'll use begin_fill() and end_fill() to fill the petals and center of the flower with colors.
  • Experiment with loops and angles: Loops will allow us to repeat drawing the petals multiple times, making the process efficient.

Example 1: In this example, we will create a basic flower with six petals. The turtle will use loops to draw each petal repeatedly, making the drawing process more efficient. We'll also fill the petals with color and draw a yellow center for the flower.

Output

👁 Output
Flower

Explanation:

  • draw_petal() function defines the shape of a single petal. The turtle draws a circular arc and turns to form each side of the petal. We repeat this process 6 times using a for loop to form the entire flower.
  • Flower Center: After drawing the petals, we move the turtle to the center of the flower and draw a yellow-filled circle to represent the flower's center.

Example 2: In this more advanced example, we will create a flower with more intricate petals and leaves. The petals have different shapes and curves and we will add green leaves around the flower to enhance its appearance.

Output

Explanation:

  • Use circular arcs, lines and turns to create the base, filled with red using begin_fill() and end_fill().
  • Draw two petals using multiple circular arcs with varying angles and directions for a smooth shape.
  • Draw leaves around the flower using the circle() command and fill them with green.
Comment
Article Tags:
Article Tags: