Python Turtle Rose

In this tutorial, we have made a Python turtle rose with the help of Python turtle library with using different colors to make our page so attractive. We will also cover different block of codes through which we can have better understanding of the code.

 Python turtle Rose Day special
Python turtle Rose Day special

Python Turtle Rose

Block of code:

In this Python, turtle block of code, we will import turtle libraries to make a beautiful rose. And this rose is done with the help of a turtle.

  • tur.title(“Pythontpoint”) is used to give the title to the window.
  • tur.write(“Happy Rose Day…..!!!!”,align=”right”,font=(“Times New Roman”,25, “bold”)) is used to write the text on the screen.
from turtle import *
import turtle as tur
tur.title("Pythontpoint")
tur.write("Happy Rose Day.....!!!!",align="right",font=("Times New Roman",
                                    25, "bold"))

Block of code:

In this Python Turtle rose block of code, we will set the initial position of the turtle to draw the shape of a rose.

  • tur.penup () is used to stop the drawing.
  • tur.left (90) is used to move the turtle in the left direction.
  • tur.fd (200) is used to move the turtle in the forward direction.
  • tur.pendown () is used to start drawing.
  • tur.right (90) is used to move the turtle in the right direction.
# Set initial position
tur.penup ()
tur.left (90)
tur.fd (200)
tur.pendown ()
tur.right (90)

Block of code:

In this Python turtle rose block of code, we will create a flower base to draw a beautiful rose flower on the screen.

  • tur.fillcolor (“red”) is used to fill the color inside the shape.
  • tur.begin_fill () is used to start filling color.
  • tur.circle (10,180) is used to draw the circle on the screen.
  • tur.left (50) is used to move the turtle in the left direction.
  • tur.right (24) is used to move the turtle in the right direction.
  • tur.fd (30) is used to move the turtle in the forward direction.
  • tur.end_fill () is used to stop filling color.
# flower base
tur.fillcolor ("red")
tur.begin_fill ()
tur.circle (10,180)
tur.circle (25,110)
tur.left (50)
tur.circle (60,45)
tur.circle (20,170)
tur.right (24)
tur.fd (30)
tur.left (10)
tur.circle (30,110)
tur.fd (20)
tur.left (40)
tur.circle (90,70)
tur.circle (30,150)
tur.right (30)
tur.fd (15)
tur.circle (80,90)
tur.left (15)
tur.fd (45)
tur.right (165)
tur.fd (20)
tur.left (155)
tur.circle (150,80)
tur.left (50)
tur.circle (150,90)
tur.end_fill ()

Block of code:

In this Python Turtle rose block of code, we will create a petal1 to make a rose with the help of a python turtle.

  • tur.left (150) is used to move the turtle in the left direction.
  • tur.circle (-90,70) is used to draw the circle with the help of a turtle.
  • tur.setheading (60) is used to set the heading.
# Petal 1
tur.left (150)
tur.circle (-90,70)
tur.left (20)
tur.circle (75,105)
tur.setheading (60)
tur.circle (80,98)
tur.circle (-90,40)

Block of code:

In this Python turtle block of code, we will create a petal2 to make a rose with the help of a turtle.

  • tur.left (180) is used to move the turtle in the left direction.
  • tur.circle (90,40) is used to draw the circle on the circle on the screen.
# Petal 2
tur.left (180)
tur.circle (90,40)
tur.circle (-80,98)
tur.setheading (-83)

Block of code:

In this Python turtle block of code, we will make leaf1 to create a beautiful rose flower using a python turtle.

  • tur.fd (30) is used to move the turtle in the forward direction.
  • tur.left (90) is used to move the turtle in the left direction.
  • tur.fillcolor (“green”) is used to fill the color inside the shape.
  • tur.begin_fill () is used to start filling color.
  • tur.circle (-80,90) is used to draw the circle on the screen.
  • tur.end_fill () is used to stop filling color.
  • tur.right (90) is used to move the turtle in the right direction.
# Leaves 1
tur.fd (30)
tur.left (90)
tur.fd (25)
tur.left (45)
tur.fillcolor ("green")
tur.begin_fill ()
tur.circle (-80,90)
tur.right (90)
tur.circle (-80,90)
tur.end_fill ()
tur.right (135)
tur.fd (60)
tur.left (180)
tur.fd (85)
tur.left (90)
tur.fd (80)

Check this code in Repository from Github and you can also fork this code.

Github User Name: PythonT-Point

Block of code:

In this Python turtle block of code, we will make a leaf2 to draw the rose and give the final touchup to the flower.

  • tur.right (90) is used to move the turtle in the right direction.
  • tur.fillcolor (“green”) is used to fill the color inside the shape.
  • tur.begin_fill () is used to start filling color.
  • tur.circle (80,90) is used to draw the circle on the screen.
  • tur.end_fill () is used to stop filling color.
  • tur.left (135) is used to move the turtle in the left direction.
  • tur.fd (60) is used to move the turtle in the forward direction.
# Leaves 2
tur.right (90)
tur.right (45)
tur.fillcolor ("green")
tur.begin_fill ()
tur.circle (80,90)
tur.left (90)
tur.circle (80,90)
tur.end_fill ()
tur.left (135)
tur.fd (60)
tur.left (180)
tur.fd (60)
tur.right (90)
tur.circle (200,60)
tur.done()

Read: Python Turtle Logo

Code:

In the following Python Turtle Rose code, we will create a beautiful red rose with the help of a turtle.

The turtle is used to draw a different shape on the screen here turtle is work as a pen and the screen works as a drawing board.

from turtle import *
import turtle as tur
tur.title("Pythontpoint")
tur.write("Happy Rose Day.....!!!!",align="right",font=("Times New Roman",
                                    25, "bold"))
# Set initial position
tur.penup ()
tur.left (90)
tur.fd (200)
tur.pendown ()
tur.right (90)

# flower base
tur.fillcolor ("red")
tur.begin_fill ()
tur.circle (10,180)
tur.circle (25,110)
tur.left (50)
tur.circle (60,45)
tur.circle (20,170)
tur.right (24)
tur.fd (30)
tur.left (10)
tur.circle (30,110)
tur.fd (20)
tur.left (40)
tur.circle (90,70)
tur.circle (30,150)
tur.right (30)
tur.fd (15)
tur.circle (80,90)
tur.left (15)
tur.fd (45)
tur.right (165)
tur.fd (20)
tur.left (155)
tur.circle (150,80)
tur.left (50)
tur.circle (150,90)
tur.end_fill ()

# Petal 1
tur.left (150)
tur.circle (-90,70)
tur.left (20)
tur.circle (75,105)
tur.setheading (60)
tur.circle (80,98)
tur.circle (-90,40)

# Petal 2
tur.left (180)
tur.circle (90,40)
tur.circle (-80,98)
tur.setheading (-83)

# Leaves 1
tur.fd (30)
tur.left (90)
tur.fd (25)
tur.left (45)
tur.fillcolor ("green")
tur.begin_fill ()
tur.circle (-80,90)
tur.right (90)
tur.circle (-80,90)
tur.end_fill ()
tur.right (135)
tur.fd (60)
tur.left (180)
tur.fd (85)
tur.left (90)
tur.fd (80)

# Leaves 2
tur.right (90)
tur.right (45)
tur.fillcolor ("green")
tur.begin_fill ()
tur.circle (80,90)
tur.left (90)
tur.circle (80,90)
tur.end_fill ()
tur.left (135)
tur.fd (60)
tur.left (180)
tur.fd (60)
tur.right (90)
tur.circle (200,60)
tur.done()

Output:

After running the above code we get the following output in which we can see that a beautiful red rose is drawn on the screen using Python turtle.

Python Turtle Rose
Python Turtle Rose

Leave a Comment