Ads

I LOVE YOU IN PYTHON PROGRAMMING | HEART DRAWING IN PYTHON LANGUAGE | ANIMATION PYTHON CODING

  # WELCOME ALL OF YOU ON COMPUTER SOFT SKILLS CHANNEL


# PTHON PROGRAM TO CREATE I LOVE U WITH ANIMATION




import turtle


import random


wn = turtle.Screen()


wn.setup(width=800, height=800)


t = turtle.Turtle() 


turtle.bgcolor("yellow")


t.pensize(4)


t.pencolor("red")






def myPosition(x,y):


    t.penup()


    t.goto(x,y)


    t.pendown()




# draw i ______________


myPosition(-200,0)


t.pencolor("red")


t.fillcolor("blueviolet")


t.begin_fill()


t.forward(60)


t.left(90)


t.forward(20)


t.left(90)


t.forward(20)


t.right(90)


t.forward(60)


t.right(90)


t.forward(20)


t.left(90)


t.forward(20)


t.left(90)


t.forward(60)


t.left(90)


t.forward(20)


t.left(90)


t.forward(20)


t.right(90)


t.forward(60)


t.right(90)


t.forward(20)


t.left(90)


t.forward(20)


t.right(270)


t.end_fill()


myPosition(0,0)




# draw heart ________________


def curve(): 


    for i in range(200): 


        t.right(1)


        t.forward(1)




def heart():


    t.pencolor("darkviolet")


    t.fillcolor('deeppink')


    t.begin_fill()


    t.left(140)


    t.forward(113)


    curve() 


    t.left(120)


    curve() 


    t.forward(112)


    t.end_fill()


heart()




# draw u ________________


t.ht()


t.pencolor("red")


t.fillcolor('blueviolet')


myPosition(140,0)


t.begin_fill()


t.left(140)


t.forward(90)


t.left(90)


t.forward(100)


t.left(90)


t.forward(20)


t.left(90)


t.forward(80)


t.right(90)


t.forward(50)


t.right(90)


t.forward(80)


t.left

(90)


t.forward(20)


t.left(90)


t.forward(100)


t.end_fill()


turtle.done()




#_________________________ LIKE ___________ SHARE _______________ SUBSCRIBE ________________


Post a Comment

0 Comments