In this tutorial, we will discuss a step-by-step guide on How To Draw A Flower In Turtle Python With Source Code for free.
The code is very simple and easy to understand. So let’s start.
What is Turtle Python?
Python Turtle is a feature like a drawing board, which lets us command the turtle to draw all over it! which can move the turtle around with the use of functions like turtle.forward() and turtle.right()
Draw A Flower Using Turtle In Python
Here’s a step-by-step guide on How To Draw A Flower In Python Turtle with Source Codes.
Step 1: Import Python Turtle Library
First, we will import the Python Turtle Library so that we can access the function of the program.
Here’s the code:
import turtleStep 2: Set Initial Position
Next, we will set the initial position of the turtle.
Here’s the code:
# Set initial position
turtle.penup()
turtle.left(90)
turtle.fd(200)
turtle.pendown()
turtle.right(90)Step 3: Start Draw The Flower
Now, let’s start to draw the flower.
Here’s the code:
# flower base
turtle.fillcolor("pink")
turtle.begin_fill()
turtle.circle(10, 180)
turtle.circle(25, 110)
turtle.left(50)
turtle.circle(60, 45)
turtle.circle(20, 170)
turtle.right(24)
turtle.fd(30)
turtle.left(10)
turtle.circle(30, 110)
turtle.fd(20)
turtle.left(40)
turtle.circle(90, 70)
turtle.circle(30, 150)
turtle.right(30)
turtle.fd(15)
turtle.circle(80, 90)
turtle.left(15)
turtle.fd(45)
turtle.right(165)
turtle.fd(20)
turtle.left(155)
turtle.circle(150, 80)
turtle.left(50)
turtle.circle(150, 90)
turtle.end_fill()
# Petal 1
turtle.left(150)
turtle.circle(-90, 70)
turtle.left(20)
turtle.circle(75, 105)
turtle.setheading(60)
turtle.circle(80, 98)
turtle.circle(-90, 40)
# Petal 2
turtle.left(180)
turtle.circle(90, 40)
turtle.circle(-80, 98)
turtle.setheading(-83)Step 4: Draw Leaves Of The Flower
Next, let’s create the leaves of the flower.
Here’s the code:
# Leaves 1
turtle.fd(30)
turtle.left(90)
turtle.fd(25)
turtle.left(45)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(-80, 90)
turtle.right(90)
turtle.circle(-80, 90)
turtle.end_fill()
turtle.right(135)
turtle.fd(60)
turtle.left(180)
turtle.fd(85)
turtle.left(90)
turtle.fd(80)
# Leaves 2
turtle.right(90)
turtle.right(45)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(80, 90)
turtle.left(90)
turtle.circle(80, 90)
turtle.end_fill()
turtle.left(135)
turtle.fd(60)
turtle.left(180)
turtle.fd(60)
turtle.right(90)
turtle.circle(200, 60)
turtle.done()Complete Source Code On How To Draw A Flower
Here’s the complete source code on how to draw a flower:
import turtle
# Set initial position
turtle.penup()
turtle.left(90)
turtle.fd(200)
turtle.pendown()
turtle.right(90)
# flower base
turtle.fillcolor("pink")
turtle.begin_fill()
turtle.circle(10, 180)
turtle.circle(25, 110)
turtle.left(50)
turtle.circle(60, 45)
turtle.circle(20, 170)
turtle.right(24)
turtle.fd(30)
turtle.left(10)
turtle.circle(30, 110)
turtle.fd(20)
turtle.left(40)
turtle.circle(90, 70)
turtle.circle(30, 150)
turtle.right(30)
turtle.fd(15)
turtle.circle(80, 90)
turtle.left(15)
turtle.fd(45)
turtle.right(165)
turtle.fd(20)
turtle.left(155)
turtle.circle(150, 80)
turtle.left(50)
turtle.circle(150, 90)
turtle.end_fill()
# Petal 1
turtle.left(150)
turtle.circle(-90, 70)
turtle.left(20)
turtle.circle(75, 105)
turtle.setheading(60)
turtle.circle(80, 98)
turtle.circle(-90, 40)
# Petal 2
turtle.left(180)
turtle.circle(90, 40)
turtle.circle(-80, 98)
turtle.setheading(-83)
# Leaves 1
turtle.fd(30)
turtle.left(90)
turtle.fd(25)
turtle.left(45)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(-80, 90)
turtle.right(90)
turtle.circle(-80, 90)
turtle.end_fill()
turtle.right(135)
turtle.fd(60)
turtle.left(180)
turtle.fd(85)
turtle.left(90)
turtle.fd(80)
# Leaves 2
turtle.right(90)
turtle.right(45)
turtle.fillcolor("green")
turtle.begin_fill()
turtle.circle(80, 90)
turtle.left(90)
turtle.circle(80, 90)
turtle.end_fill()
turtle.left(135)
turtle.fd(60)
turtle.left(180)
turtle.fd(60)
turtle.right(90)
turtle.circle(200, 60)
turtle.done()Conclusion
We have completely discussed a step-by-step process on How To Draw A Flower with Source Codes For Free. I hope this Python Turtle tutorial will help you a lot!
Recommendation
- If you want to learn and developed different python games. I have here the list of pygame tutorials with source code for free.
- Also, If you want to enhance your knowledge of python programming. I have here the list of Python tutorials for beginners.
Frequently Asked Questions
How does the Turtle-based flower drawing program work?
It uses Python’s built-in turtle module (no Pygame needed) to draw geometric flower patterns. The turtle moves and turns in mathematical patterns, drawing arcs and circles to form petals. Color cycles per petal using turtle.color() with HSV-converted RGB values. Repeat the petal-drawing function 6, 8, or 12 times for different flower types. Great teaching project for loops, recursion, and procedural art.
What Python version do I need to run this game?
Python 3.8 or newer works. We recommend Python 3.11 or 3.12 because Pygame ships pre-built wheels for those versions (faster pip install, no compilation errors). Python 3.13 may need a slightly older Pygame release because some wheels lag the latest CPython. Verify your version with python –version on Windows or python3 –version on Mac/Linux.
How do I install Pygame for this project?
Run pip install pygame in your terminal (Windows: open Command Prompt, Mac/Linux: open Terminal). On Windows, if pip is not recognized, try python -m pip install pygame instead. On Linux, you may need sudo apt install python3-pygame if pip fails. Verify with python -c “import pygame; print(pygame.version.ver)”.
Can I use this Python game as my BSIT capstone project?
On its own, no, most Philippine BSIT panels expect a full system with users, data, reports, and a real-world problem. A single Pygame game is too narrow for capstone scope. BUT, you can use this game as ONE module inside a larger capstone (e.g. a gamified learning system, a math practice tool for elementary students with this game as the reward layer, or an arcade-style POS for an internet cafe). Pair the game with a Django backend, a database, and analytics for a defensible capstone.
Can I package this game as a standalone .exe to distribute?
Yes, use PyInstaller. Run pip install pyinstaller then pyinstaller –onefile –windowed your_game.py from the project folder. PyInstaller bundles Python and Pygame into a single .exe (Windows) or .app (Mac) that runs without Python installed on the target machine. Include asset files (images, sounds) with –add-data “assets;assets”. Output goes to the dist/ folder.
Where do I get help if the game does not run?
Check the top 3 most common failures: (1) Pygame is not installed correctly, re-run pip install pygame. (2) The game cannot find an asset file (image/sound), make sure you run python from the project folder so relative paths resolve. (3) Wrong Python version, this code expects Python 3.8+; older Python 2.x or 3.6 raises syntax errors. If you still hit a wall, drop a comment on this article with the exact error message, our team monitors comments daily.
Inquiries
By the way, If you have any questions or suggestions about this Python Turtle tutorial, please feel free to comment below.
