heart pattern turtle
from turtle import *
import turtle
wn= turtle.Screen()
wn.setup(width=400,height=400)
wn. bgcolor("blue")
wn. title("Heart!")
color("red")
begin_fill()
left(50)
forward(100)
circle(40,180)
left(260)
circle(40,180)
forward(100)
end_fill()
left(140)
color("red")
forward(100)
turtle.pencolor("white")
turtle.write("I Love Python")
done()
# 2nd programm
from turtle import *
import turtle
wn= turtle.Screen()
wn.setup(width=400,height=400)
wn. bgcolor("blue")
wn. title("Heart!")
color("red")
begin_fill()
left(50)
forward(100)
circle(40,180)
left(260)
circle(40,180)
forward(100)
end_fill()
left(140)
color("red")
forward(100)
turtle.pencolor("white")
turtle.write("I Love Python")
left(180)
color("red")
forward(100)
color("blue")
forward(100)
color("yellow")
turtle.write("🎈 🎁")
color("blue")
right(120)
color("blue")
forward(100)
color("orange")
turtle.write("🎈 🎈")
color("blue")
right(180)
forward(8)
color("red")
turtle.write("🎈")
color("blue")
forward(50)
color("pink")
turtle.write("🎈")
color("blue")
forward(10)
left(50)
forward(100)
color("orange")
turtle.write("🎈 🎈")
color("blue")
right(50)
forward(20)
color("white")
turtle.write("🎂")
color("blue")
forward(20)
done()
Comments
Post a Comment