
Introduction
Hello and welcome to the copyassignment, today we will learn how to write the I Love You Program In Python Turtle. This could be very interesting for both beginners and experienced coders to learn. This could be simple and easy to understand because we have explained the code in simple terms.
Click here if you want to only copy the code for the I Love You Program In Python Turtle.
We have one similar article, there, we have explained How to write I Love You In Coding languages. We recommend you to visit that article as well.
Now, let’s start coding for the I Love You In Python Turtle.
Step 1: Importing Turtle Library
# Importing turtle library to draw "I Love You"
import turtle
Step 2: Creating a Cursor and a Separate Canvas
# Creating our turtle cursor to draw
my_turtle_cursor = turtle.Turtle()
# Creating a separate Canvas to draw "I Love You"
my_turtle_screen = turtle.Screen()
Step 3: Creating a Heart Background for the I Love You Program In Python Turtle
# Method to draw a heart
def draw_complete_heart():
# Set the fill color to #FF0000
my_turtle_cursor.fillcolor("#FF0000")
# Start filling the color
my_turtle_cursor.begin_fill()
# Draw the left line
my_turtle_cursor.left(140)
my_turtle_cursor.forward(294)
# Calling the function to draw left curve of our heart
draw_left_curve_of_heart()
# Draw the left line
my_turtle_cursor.right(190)
# Calling the function to draw right curve of our heart
draw_right_curve_of_heart()
# Draw the right line
my_turtle_cursor.forward(294)
# Ending the filling of the color
my_turtle_cursor.end_fill()
Step 4: Creating a Function to Draw the Left Curve of our Heart Background
# Defining a method to draw left curve of our hearth background
def draw_left_curve_of_heart():
my_turtle_cursor.speed(50)
# For Loop for creating left curves
for i in range(450):
my_turtle_cursor.right(0.5)
my_turtle_cursor.forward(1.2)
Step 5: Creating a Function to Write “I” inside our Heart background
# Function to write "I" inside heart
def write_I_inside_heart():
my_turtle_cursor.penup()
# Co-ordinates where we have to write "I"
my_turtle_cursor.goto(-180, 15)
# Setting the text color of our text
my_turtle_cursor.pencolor("#FFFFFF")
# Adding the text and changing the font of our text
my_turtle_cursor.write("I", font=("Helevetica", 54, "bold"))
Step 6: Creating a Function to Write “Love” inside our Heart Background
# Function to write "Love" inside heart
def write_Love_inside_heart():
my_turtle_cursor.penup()
# Co-ordinates where we have to write "Love"
my_turtle_cursor.goto(-125, 15)
# Setting the text color of our text
my_turtle_cursor.pencolor("#FFFFFF")
# Adding the text and changing the font of our text
my_turtle_cursor.write("Love", font=("Helevetica", 54, "bold"))
Step 7: Creating a Function to Write “You” Inside our Heart Background
# Function to write "You" inside heart
def write_you_inside_heart():
my_turtle_cursor.penup()
# Co-ordinates where we have to write "You"
my_turtle_cursor.goto(60, 15)
# Setting the text color of our text
my_turtle_cursor.pencolor("#FFFFFF")
# Adding the text and changing the font of our text
my_turtle_cursor.write("You", font=("Helevetica", 54, "bold"))
Step 8: Creating a Pause Function to Pause a Cursor at the End of the I Love You Program In Python Turtle
# Creating a pause function to pause the cursor
def pause():
my_turtle_cursor.speed(2)
for i in range(100):
my_turtle_cursor.left(90)
Step 9: Changing the Start Position of Our Cursor
# Changing start position of our turtle cursor
my_turtle_cursor.penup()
my_turtle_cursor.goto(0, -200)
my_turtle_cursor.pendown()
Step 10: Setting up the Configuration of the Cursor and Calling all the Required Function
# Setting the speed of our cursor
my_turtle_cursor.speed(50)
# Calling a Function to Draw a complete Heart Background
draw_complete_heart()
# Calling a Function to write "I" Inside our hearth Background
write_I_inside_heart()
# Calling a Function to write "Love" Inside our hearth Background
write_Love_inside_heart()
# Calling a Function to write "You" Inside our hearth Background
write_you_inside_heart()
Complete Code For I Love You Program In Python Turtle
# Importing turtle library to draw "I Love You"import turtle# Creating our turtle cursor to drawmy_turtle_cursor = turtle.Turtle()# Creating a separate Canvas to draw "I Love You"my_turtle_screen = turtle.Screen()# Creating a pause function to pause the cursordef pause():my_turtle_cursor.speed(2)for i in range(100):my_turtle_cursor.left(90)# Function to write "I" inside heartdef write_I_inside_heart():my_turtle_cursor.penup()# Co-ordinates where we have to write "I"my_turtle_cursor.goto(-230, 15)# Setting the text color of our textmy_turtle_cursor.pencolor("#FFFFFF")# Adding the text and changing the font of our textmy_turtle_cursor.write("I", font=("Helevetica", 54, "bold"))# Function to write "Love" inside heartdef write_Love_inside_heart():my_turtle_cursor.penup()# Co-ordinates where we have to write "Love"my_turtle_cursor.goto(-160, 15)# Setting the text color of our textmy_turtle_cursor.pencolor("#FFFFFF")# Adding the text and changing the font of our textmy_turtle_cursor.write("Love", font=("Helevetica", 54, "bold"))# Function to write "You" inside heartdef write_you_inside_heart():my_turtle_cursor.penup()# Co-ordinates where we have to write "You"my_turtle_cursor.goto(80, 15)# Setting the text color of our textmy_turtle_cursor.pencolor("#FFFFFF")# Adding the text and changing the font of our textmy_turtle_cursor.write("You", font=("Helevetica", 54, "bold"))# Method to draw a heartdef draw_complete_heart():# Set the fill color to #FF0000my_turtle_cursor.fillcolor("#FF0000")# Start filling the colormy_turtle_cursor.begin_fill()# Draw the left linemy_turtle_cursor.left(140)my_turtle_cursor.forward(294)# Calling the function to draw left curve of our heartdraw_left_curve_of_heart()# Draw the left linemy_turtle_cursor.right(190)# Calling the function to draw right curve of our heartdraw_right_curve_of_heart()# Draw the right linemy_turtle_cursor.forward(294)# Ending the filling of the colormy_turtle_cursor.end_fill()# Defining a method to draw left curvedef draw_left_curve_of_heart():my_turtle_cursor.speed(50)# For Loop for creating left curvesfor i in range(450):my_turtle_cursor.right(0.5)my_turtle_cursor.forward(1.2)# Defining a method to draw right curvedef draw_right_curve_of_heart():my_turtle_cursor.speed(50)# For Loop for creating right curvesfor i in range(450):my_turtle_cursor.right(0.5)my_turtle_cursor.forward(1.2)# Changing start position of our turtle cursormy_turtle_cursor.penup()my_turtle_cursor.goto(0, -200)my_turtle_cursor.pendown()# Setting the speed of our cursormy_turtle_cursor.speed(50)# Calling a Function to Draw a complete Heart Backgrounddraw_complete_heart()# Calling a Function to write "I" Inside our hearth Backgroundwrite_I_inside_heart()# Calling a Function to write "Love" Inside our hearth Backgroundwrite_Love_inside_heart()# Calling a Function to write "You" Inside our hearth Backgroundwrite_you_inside_heart()turtle.done()
Output:

Video Output:
Our code is complete, and we finally run it to see the I Love You written with Python Turtle.
We hope this article on the I Love You Program In Python Turtle Library Helps you.
Thank you for reading this article, click here to start learning Python in 2022.
Also Read:
- Radha Krishna using Python Turtle
- Drawing letter A using Python Turtle
- Wishing Happy New Year 2023 in Python Turtle
- Snake and Ladder Game in Python
- Draw Goku in Python Turtle
- Draw Mickey Mouse in Python Turtle
- Happy Diwali in Python Turtle
- Draw Halloween in Python Turtle
- Write Happy Halloween in Python Turtle
- Draw Happy Diwali in Python Turtle
- Extract Audio from Video using Python
- Drawing Application in Python Tkinter
- Draw Flag of USA using Python Turtle
- Draw Iron Man Face with Python Turtle: Tony Stark Face
- Draw TikTok Logo with Python Turtle
- Draw Instagram Logo using Python Turtle
- I Love You Text in ASCII Art
- Python Turtle Shapes- Square, Rectangle, Circle
- Python Turtle Commands and All Methods
- Happy Birthday Python Program In Turtle
- I Love You Program In Python Turtle
- Draw Python Logo in Python Turtle
- Space Invaders game using Python
- Draw Google Drive Logo Using Python
- Draw Instagram Reel Logo Using Python
- Draw The Spotify Logo in Python Turtle
- Draw The CRED Logo Using Python Turtle
- Draw Javascript Logo using Python Turtle
- Draw Dell Logo using Python Turtle
- Draw Spider web using Python Turtle