Make a Heart & write 'LOVE' in Python Turtle | Draw a Heart in Python Turtle | Python Turtle Programming
watch here
Source Code :
import turtle
from turtle import *
t=turtle.Turtle()
wn=Screen()
wn.bgcolor("white")
t.pensize(2)
t.hideturtle()
t.penup()
t.setposition(70,290)
t.pendown()
t.begin_fill()
t.color("#ef0707")
t.pencolor("#ef0707")
t.right(150)
t.circle(140,75)
t.circle(-30,220)
t.circle(-70,30)
t.right(35)
t.circle(-42,-100)
t.right(140)
t.circle(40,-80)
t.right(30)
t.forward(2)
t.circle(100,110)
t.forward(200)
t.right(8)
t.circle(-60,20)
t.right(200)
t.circle(90,40)
t.forward(90)
t.circle(-50,200)
t.right(36)
t.circle(48,-185)
t.circle(90,90)
t.circle(-90,80)
t.forward(18)
t.circle(-130,27)
t.end_fill()
t.penup()
t.setposition(48,220)
t.pendown()
t.begin_fill()
t.color('orange')
t.pencolor('orange')
t.right(-40)
t.circle(-120,-40)
t.circle(-100,-25)
t.circle(90,-110)
t.right(160)
t.circle(-300,10)
t.right(-150)
t.circle(200,20)
t.circle(110,115)
t.circle(-97,104)
t.right(3)
t.circle(-190,-20)
t.end_fill()
t.penup()
#write 'LOVE'
def write(message,pos):
x,y=pos
t.goto(x,y)
t.color('red')
style=('Verdana',30,'italic')
t.write(message,font=style)
write('L',(15,-30))
write('O',(34,-30))
write('V',(63,-30))
write('E',(90,-30))
turtle.done()
0 Comments
Post a Comment