Python Heart Code | Python Heart Drawing | Python Turtle Animation

0

 


Source Code :


import turtle

sc = turtle.Screen()
sc.setup(width=400, height=400)
tr = turtle.Turtle()

def curve():
    for i in range(200):
        tr.right(1)
        tr.forward(1)
       
def heart():
    tr.fillcolor('red')
    tr.begin_fill()
    tr.left(140)
    tr.forward(113)
    curve()
    tr.left(120)
    curve()
    tr.forward(112)
    tr.end_fill()
   
heart()
tr.ht()
turtle.done()

#execute......

Watch My Full Video :





Tags

Post a Comment

0Comments

If you have any doubts, Please let me know

Post a Comment (0)