Tag Archives: heart

Drawing Heart with python turtle

Heart in python turtle

Introduction

Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzeig, Seymour Papert and Cynthia Solomon in 1967.

Turtle is a special feathers of Python. Using Turtle, we can easily draw in a drawing board.First we import the turtle module. Then create a window, next we create turtle object and using turtle method we can draw in the drawing board.

Follow us on

Code

import turtle
wn = turtle.Screen()
wn.setup(width=400, height=400)
red = turtle.Turtle()

def curve():
for i in range(200):
red.right(1)
red.forward(1)

def heart():
red.fillcolor(‘red’)
red.begin_fill()
red.left(140)
red.forward(113)
curve()
red.left(120)
curve()
red.forward(112)
red.end_fill()

heart()
red.ht()
turtle.done()

Output

Follow us on

Download as file 🔻