Chp 5 Create a picture

Your assignment: Draw a pretty picture. The goal of this lab is to get practice using functions, using for and while loops, and introduce computer graphics.


  • You must use multiple colors.
  • You must have a coherent picture. Since it is the holiday season, you could have a festive theme for your picture.
  • You must use multiple types of graphic functions (e.g. circles, rectangles, lines, etc.)
  • You must use a while or for loop to create a repeating pattern. Do not just redraw the same thing in the same location 10 times. Actually use that index variable as an offset to displace what you are drawing. Remember that you can contain multiple drawing commands in a loop, so you can draw multiple train cars for example.

For a template program to modify, look at the following example programs:

Sample pictures:


Chp 5 Graphics Continued

We will try to finish Chp5 and graphics today. If you get lost, you can follow along with the lecture here:

Please hand in the lesson to the dropbox when done. You can go ahead and take the practice quiz as well:

Pygame, starting with Graphics

Today, we are officially starting pygame. You will need to run your programs using the command line as Wing IDE 101 seems to not close the window properly when running your pygame programs (you can also use Mac OSX force quit instead).

We will try to get to the end of section 5.9. In case you get lost, here is the link to the tutorial lecture:

As usual, please submit your file to the server when done.