# HSSlive: Plus One & Plus Two Notes & Solutions for Kerala State Board

## How to Draw a Flower Using Python Turtle, Tkinter, Matplotlib & Without Libraries

How to Draw a Flower in Python - There are various methods to create a Flower using python libraries like turtle, tkinter and matplotlib. Also, you will learn how to make a Flower using python in easy and simple steps. We have also provided the python code for drawing a Flower pattern. If you have introductory to intermediate knowledge in Python and statistics, then you can use this article as a one-stop shop for building and plotting Flower patterns in Python using libraries from its scientific stack, including NumPy, Matplotlib, Pandas, and Seaborn.

Plotting a Flower in python is a simple procedure, and python in its simplest provides multiple easy methods to do so.

## How to Draw a Flower using Python?

Given below is the process to draw a Flower in python using libraries like Turtle, Tkinter, Matplotib and others.

Four Method to make a Flower in Python using multiple libraries:

1. How to draw a Flower using python turtle?
2. How to draw a Flower using python tkinter?
3. How to draw a Flower using python matplotlib?
4. How to draw a Flower using python code without library?

## How to Draw a Flower using Python Turtle?

Check below step by step process to make a Flower using the python turtle library.

Step

• Import turtle module
• Set speed of the turtle
• Using loops to avoid unnecessary repetition of code.
• Draw each step with specific coordinates

Code

import turtle

# Set initial position
turtle.penup ()
turtle.left (90)
turtle.fd (200)
turtle.pendown ()
turtle.right (90)

# flower base
turtle.fillcolor ("red")
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.circle (80,98)
turtle.circle (-90,40)

# Petal 2
turtle.left (180)
turtle.circle (90,40)
turtle.circle (-80,98)

# 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()

Output

## How to Draw a Flower using Python Tkinter?

Check below step by step process to make a Flower using the python tkinter library.

Step

Code

Output

## How to Draw a Flower using Python Matplotlib?

Check below step by step process to make a Flower using the python matplotlib library.

Step

Code

Output

## How to Draw a Flower using Python Code without Library?

Step

Code

Output

Note: Also, these codes might not run in an online compiler please use an offline compiler. Programmers can make any changes in the code according to their specific requirement.

## Conclusion on How to Draw a Flower using Python

We hope the programs and methods provided above on how to make a Flower using python libraries have been helpful to you. If there is any issue in any of the code please let us know in the comments. We will try to resolve it as soon as possible.

Share: