CS 150 - Prelab 7 - Design

Due: Friday 4/14 at the beginning of lab

(Note: this is not a paired lab — each student must work individually, both on the prelab and the lab.)


We will be using matplotlib for the lab this Friday. If you plan on working on your own computer, you'll need to make sure that matplotlib is installed before lab. Simply type "import matplotlib" at the python prompt. If nothing happens, you are all set. If you get an error "No module named matplotlib", you don't have it, and you'll need install our version of Python. Go to the Resources section at the bottom of the course home page, and follow the link for installing Python and Spyder.

If you have trouble getting matplotlib to work, please come see Ruben or me.

After you are able to import matplotlib, try out some of the simple examples from class to make sure it is installed properly. You can also check out the Pyplot tutorial linked from the course page. As demonstrated in class, it might work better to run your plotting programs in the IPython console.

Program design

I've posted the lab for this Friday on the course web page. Read through the lab and make sure you understand what the program is supposed to be doing. Once you have a good feeling for the program, your prelab for this week is to write a high-level design for your program. Your design must include the following information: As you're putting together your design, think about the following: You will be graded based on the detail that you provide in addition to how well you've thought through the problem. The more time you spend thinking about the organization of your code, the easier actually generating the final code will be.

What to hand in

I will collect your design at the beginning of lab on Friday. Since you will likely want to use your design when programming, you should have a copy for your own use as well. (Your own copy can be an electronic version, but must have a hardcopy ready for me to collect.)