Explore

Close
Python Programs Share

I Love You Program In Python With Code

I Love You Program In Python With Code

Looking for a way to say I love you to your crush or a way to propose and you are a programmer and if also he or she is a programmer then today I will tell you the programmer’s way of proposing which is the I love you program in python.

This I love you python program will open a big black screen when you run it and it will start writing I love you at the end it will also draw a heart, you can see the preview below.

I Love You Drawing In Python Turtle

This program is made with turtle python library which is a graphics library for python so if you liked this I love you python program you can get the code of this I love you program below.

If you are a beginner in python programming then don’t worry I will show you everything you need to do to run this program and get you a girlfriend now no programmers will be single.

Install and Setup Python

If you are a python programmer who has python installed can skip this step. So to install python you need to go to the python website and click download, it will download the latest version of python.

Now you need to run the installer you can click next, and one screen will come where you need to check add python to path after that python will be installed if you want a more detailed guide you can check out this – Installing and setting up python.

Installing Python Turtle

As I have said you will need turtle which is a python library so you need to install this to install you need to open a command prompt paste the below code to install respective python library.

To install Turtle use this


pip install turtle

It will take some time after that you can go to the next step.

Create and Open Python File

Now you need to create a python file in a new folder and open it in a code editor if you don’t have one I will recommend you to use VS Code or you can use any if you have, In VS Code install the python extension you can read more here – Setting python in VS Code.

After that copy the below I love you code in the python file and you can run the code by opening command prompt and pasting the below command.


python filename.py

Enter your python filename where I said filename, this will open a black window and the program will start to run.

I Love You Code In Python


import turtle

draw = turtle.Turtle()

def curve():
    draw.pen(pencolor="white", pensize=3, speed=5)
    for i in range(200):
        draw.rt(1)
        draw.fd(1)

def heart():
    draw.pen(pencolor="white",fillcolor="red", pensize=3, speed=5)
    draw.shape("turtle")
    draw.shapesize(1,1,1)
    draw.begin_fill()
    draw.lt(50)
    draw.fd(113)
    curve()
    draw.lt(120)
    curve()
    draw.fd(112)
    draw.end_fill()

    draw.hideturtle()


window = turtle.Screen()
window.bgcolor('black')

draw.penup()
draw.goto(-80,300)
draw.pendown()
draw.shapesize(1,2,1)

draw.pen(pencolor="white",fillcolor="yellow", pensize=3, speed=8)

draw.begin_fill()

draw.fd(160)
draw.rt(90)
draw.fd(25)
draw.rt(90)
draw.fd(60)
draw.lt(90)

draw.fd(140)
draw.lt(90)
draw.fd(60)
draw.rt(90)
draw.fd(25)
draw.rt(90)
draw.fd(160)
draw.rt(90)
draw.fd(25)
draw.rt(90)
draw.fd(60)
draw.lt(90)
draw.fd(140)
draw.left(90)
draw.fd(60)
draw.rt(90)
draw.fd(25)

draw.end_fill()

draw.penup()
draw.goto(-550,-20)
draw.pendown()

draw.pen(pencolor="white",fillcolor="yellow", pensize=3, speed=2)
draw.begin_fill()

draw.rt(90)
draw.fd(25)
draw.rt(90)
draw.fd(165)
draw.lt(90)
draw.fd(115)
draw.rt(90)
draw.fd(25)
draw.rt(90)
draw.fd(140)
draw.rt(90)
draw.fd(190)
draw.rt(90)

draw.end_fill()

draw.penup()
draw.fd(140)

draw.fd(70)

draw.pen(pencolor="white",fillcolor="yellow", pensize=3, speed=8)
draw.begin_fill()

draw.rt(90)
draw.fd(190)
draw.lt(90)
draw.pendown()
draw.circle(60)
draw.lt(90)
draw.penup()
draw.fd(20)
draw.rt(90)
draw.pendown()
draw.circle(40)
draw.rt(90)
draw.penup()
draw.fd(20)
draw.lt(90)

draw.end_fill()

draw.fd(100)
draw.pendown()

draw.pen(pencolor="white",fillcolor="yellow", pensize=3, speed=8)
draw.begin_fill()

draw.lt(100)
draw.fd(120)
draw.rt(100)
draw.fd(20)
draw.rt(80)
draw.fd(100)
draw.lt(80)
draw.fd(20)
draw.lt(80)
draw.fd(100)
draw.rt(80)
draw.fd(20)
draw.rt(100)
draw.fd(120)
draw.rt(80)
draw.fd(50)
draw.lt(180)

draw.end_fill()

draw.penup()
draw.fd(100)
draw.pendown()

draw.pen(pencolor="white",fillcolor="yellow", pensize=3, speed=8)
draw.begin_fill()

draw.lt(90)
draw.fd(120)
draw.rt(90)
draw.fd(80)
draw.rt(90)
draw.fd(20)
draw.rt(90)
draw.fd(60)
draw.lt(90)
draw.fd(30)
draw.lt(90)
draw.fd(60)
draw.rt(90)
draw.fd(20)
draw.rt(90)
draw.fd(60)
draw.lt(90)
draw.fd(30)
draw.lt(90)
draw.fd(60)
draw.rt(90)
draw.fd(20)
draw.rt(90)
draw.fd(80)

draw.end_fill()

draw.penup()
draw.rt(180)
draw.fd(200)
draw.pendown()


draw.pen(pencolor="white",fillcolor="yellow", pensize=3, speed=2)
draw.begin_fill()

draw.lt(90)
draw.fd(50)
draw.lt(30)
draw.fd(80)
draw.rt(120)
draw.fd(20)
draw.rt(60)
draw.fd(60)
draw.lt(180)
draw.rt(60)
draw.fd(60)
draw.rt(60)
draw.fd(20)
draw.rt(120)
draw.fd(80)
draw.lt(30)
draw.fd(50)
draw.rt(90)
draw.fd(20)
draw.rt(180)

draw.end_fill()

draw.penup()
draw.fd(120)
draw.pendown()


draw.pen(pencolor="white",fillcolor="yellow", pensize=3, speed=8)
draw.begin_fill()

draw.circle(60)
draw.lt(90)
draw.penup()
draw.fd(20)
draw.pendown()
draw.rt(90)
draw.circle(40)
draw.rt(90)
draw.penup()
draw.fd(20)
draw.lt(90)

draw.end_fill()

draw.fd(100)
draw.circle(60, extent=60)
draw.pendown()

draw.pen(pencolor="white",fillcolor="yellow", pensize=3, speed=8)
draw.begin_fill()

draw.lt(30)

draw.fd(85)
draw.lt(90)
draw.fd(20)
draw.lt(90)
draw.fd(70)
draw.circle(-20, extent=180)
draw.fd(70)
draw.lt(90)

draw.fd(20)
draw.lt(90)
draw.fd(85)
draw.circle(40, extent=180)

draw.end_fill()

draw.penup()

draw.rt(180)
draw.fd(35)
draw.lt(90)
draw.fd(140)
draw.lt(90)
draw.pendown()

heart()

turtle.done()

I hope this I love you python program impressed your crush and became your girlfriend. If not don’t worry, next time or you can run this it will say I love you to you.

This was for today. If you found this helpful, great if you want more interesting python programs like this than join our Telegram Channel to get the latest updates of our blog.

Here are some more python guides:

Thank you for watching, have a nice day 🙂