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.

Requirements:

  • 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:
ProgramArcadeGames.com/python_examples/f.php?file=pygame_base_template.py
ProgramArcadeGames.com/python_examples/f.php?file=simple_graphics_demo.py

Sample pictures:

lab_5_fig_2
lab_5_fig_3
lab_5_fig_4
lab_5_fig_5
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s