In today’s article, we will tell you how to make a Heart ❤️ shape using Turtle inside Python and how to write text in it. If you like it then share it.
Let’s Start
import turtle
turtle.hideturtle()
pen = turtle.Turtle()
def curve():
for i in range(200):
pen.right(1)
pen.forward(1)
def heart():
pen.fillcolor('red')
pen.begin_fill()
pen.left(140)
pen.forward(113)
curve()
pen.left(120)
curve()
pen.forward(112)
pen.end_fill()
def txt():
pen.up()
pen.setpos(-42, 90)
pen.down()
pen.color('white')
pen.write("RakeshMgs", font=("Arial", 12, "bold"))
heart()
txt()
pen.ht()
turtle.exitonclick()
Preview
if you like Draw Heart ❤️ in Python with Turtle Graphics | Python Code for Heart Shape share to your friends