Custom Search

PYTHON: A Turtle Graphics Project

Holly

(December 2022)

import turtlecount=0
#set up screen
screen=turtle.Screen(500,500)
screen.bgcolor("#123456")
# set the screen background
screen.bgpic("snow.png")
#add graphics for cursor
screen.addshape("fairySihouettewhite.png")#add the cursor
fairy = turtle.Turtle("fairySihouettewhite.png")
fairy.color("dark green")
fairy.shape("fairySihouettewhite.png")
fairy.fillcolor("#33FF33")
#draw holly
while count<3:
fairy.down()
fairy.begin_fill()
fairy.circle(50,75)
fairy.rt(120)
fairy.circle(50,75)
fairy.rt(120)
fairy.circle(50,75)
fairy.rt(165)
fairy.circle(50,75)
fairy.rt(120)
fairy.circle(50,75)
fairy.rt(120)
fairy.circle(50,75)
fairy.end_fill()
fairy.rt(180)
fairy.circle(360,20)
fairy.up()
fairy.home()
count=count+1
fairy.rt((count*120))
else:
count=0
#draw berries
fairy.color("dark red")
fairy.fillcolor("red")
while count<3:
fairy.down()
fairy.begin_fill()
fairy.circle(10,360)
fairy.end_fill()
fairy.up()
fairy.home()
count=count+1
fairy.rt(count*120)
else:
count=0
fairy.up()
fairy.goto(-170,-150)
fairy.lt(810)
#Greeting
screen.addshape("MerryXmas.png")#add text message
text = turtle.Turtle("MerryXmas.png")
text.shape("MerryXmas.png")
text.up()
text.rt(630)
text.forward(156)