Lab 6: Turtle Graphics

For this lab, you will prepare a single file, called lab6.py. I've prepared a starter file for you, available here on the course webpage.

Turning in your work

Be sure to turn in whatever you have finished, at the end of the lab session. You may continue to work until midnight, and submit your work again.

Late penalties: 1 day late: -5%, 2 days: -10%, -3 days: -20%.

To turn your work in, go to mycourses.unh.edu, find CS414, open the syllabus, and click on Lab 6. Then click Submit Assignment, click Choose file, and find lab6.py.

Your task:

Using the turtle module, write a python program that draws the following scene:
It contains the following elements:

Turtle reference:

Here are examples os turtle functions that you will find useful:
goto(10, 20) Moves the pen to position (10, 20)
setpos(10, 20) Moves the pen to position (10,20), same as goto
forward(100) Moves the pen forward 100 units
fd(100) Moves the pen forward 100 units, same as forward
setheading(90) 'forward' is now up (0 = right, 90 = up, 180 = left, 270 = down)
right(90) rotates the heading 90 degrees to the right
rt(90) rotates the heading 90 degrees to the right, same as right
left(90) rotates the heading 90 degrees to the left
lt(90) rotates the heading 90 degrees to the left, same as left
penup() Pen movement won't do any drawing
pendown() Pen movement will draw something
color('red') Lines will be drawn red, from here on
pensize(5) Lines be drawn 5 pixels thick, from here on
begin_fill() Start a filled polygon
end_fill() Finish a filled polygon
fillcolor('yellow') Polygons will be filled with yellow pixels
tracer(True) Show the pen's movements
tracer(False) Don't show the pen's movements (draws much faster)