CS 110 Lab Project 1
In this lab, you will practice graphics and lots of function invocation in Python.
Step 1: Sketching a picture
From your NextClass Assignment 3, you should have already completed this step: a draft of the picture you are going to create using Python and the graphics library. The picture must consist of any combination of lines, rectangles, circles, ovals, text, and polygons but should be made entirely by hand (i.e., not made by a computer program). The picture should have at least twenty of the above shapes (though more is always better), using at least one of each of the base objects in the graphics library. It will help to have some notion of the scale, in pixels, of the overall picture, and of the objects that you are placing withing the picture. Target a canvas size of around 640 by 480. Here are some examples made by earlier students in this
course:
Step 2: Rendering the picture
You should practice familiarity with graphical objects in Python by drawing your hand-drawn paper using graphical objects in Python. Put your Python program that draws your picture in a file called Picture.py. To repeat a collection of objects on different parts of the screen, think of how you might do this using functions, with parameters to govern where on the canvas a repeatable set of steps should be placed.Refer to the following link (or to your handout) to see how to use the different graphical objects availble to you: http://mcsp.wartburg.edu/zelle/python/graphics/graphics/.
You can get a screen capture of your picture using the Grab utility (you can find this under Applications -> Utilities) and save it as tiff file.
Submitting your lab
Make sure that all your work for this lab is in a folder called lab01. Copy this folder into your Asignment Inbox personal folder on the shared drives by the deadline.Please make sure that your lab01 directory has the following files:
-
Picture.py
-
your picture tiff