CS 115 Lab 9, Spring 2015
Deadlines
- Pre-lab: Tu 3/24/2015 at 7 AM
- Writeup and code (lab09b.py): Tu 4/7/2015 at 4 PM
- Demo (part B): Any lab section, workshop, or open tutoring session before Tu 4/7 at 4 PM.
Your last chance is the Tuesday tutoring from 3-4 PM.
Goals
Upon successful completion of this lab, you should be able to understand
and write functions using two-dimensional (nested) lists.
Pre-Lab Assignment
Click here for the pre-lab instructions.
Even if you didn't get to the pre-lab by the deadline, you should work through it before proceeding with the rest of the lab. A PDF of the
pre-lab is available on Moodle.
Setup
- Before you start writing code, you will set up a directory for this assignment
on the cwolf server. To connect to cwolf, do one of the following:
- Enter your CS 115 subdirectory by typing
cd cs115
- Type pwd (print working directory) and verify that the output is:
/home/student/yourusername/cs115
- Create a directory for Lab 9 by typing
mkdir lab09
- Enter your Lab 9 directory by typing
cd lab09
- Type pwd again, and verify that the output is:
/home/student/yourusername/cs115/lab09
- Copy four files into your new directory by typing:
cp ~srivoire/cs115/pickup/ms*.txt ~/cs115/lab09/
If you get any errors, call a member of the course staff to help you.
- Decide whether you want to work directly on cwolf ([remote]) or work on IDLE at your local computer ([local]), and follow the relevant instructions for the rest of the lab.
- If you're working locally, right-click or control-click to download these 4 files into your default Python directory (C:\Python34 on Windows or Documents on a Mac):
Lab Instructions
Follow the links below to complete each part of this lab.
- Create a magic square
- Verify magic squares
- Submit your code