CS8, Fall 2010

min, max, index vs. value


lab06 and lab07 have the same deadline, which is one week from today.

Instead of assigning one 300 point lab this week, I've assigned two smaller 150 point labs. They are both due at the same time, though.

Dividing them up has several benefits for you and the TAs:

Goals for this lab

By the time you have completed this lab, you should be able to understand the concept of min, max, index and value as they apply to lists.

In particular, you'll be able to:

Step by Step Instructions

The instructions for this lab are pretty much the same as for lab05.

You'll need to:

  1. Register your pair partner on the lab06/lab07 pair partner forum
    • Note: this is required this week. You MUST do this in order to earn full credit for this lab.
  2. Start by reading over the entire lab—each of you should do this if you are working in a pair.
  3. Decide whose account you will be working in.
    • Be sure to share the file with each other at the end of each work session, in case your pair partner disappears.
  4. Create a directory for lab06 in one of your accounts called ~/cs8/lab06
  5. Bring up IDLE and a window for function definitions, and start a file with the usual stuff at the top (see lab06 for details if necessary), and save the file with the (e.g. lab06.py).
  6. Copy the starting point file into your file and run it:

    The starting point for this week's lab can be found at this link:


    Then open the file, and follow the instructions in the usual way, until the file passes all the tests.
  7. Do your final inspection (see lab05 for the details), and then submit your lab06 directory on CSIL using this command:

    turnin lab06@cs8 lab06



Evaluation and Grading Rubric (150 pts)

Points Item

Making a post on the lab06/lab07 pair partner forum

  • Follow the instructions on the forum
  • The post needs to have both pair partner's names and the days/times you can get together between labs.
  • It also needs to have answers to the questions about pair programming--i.e. what you'd like to see in an ideal partner, and what you'd like to avoid.

Professional software practices:

  • Naming the file lab06.py
  • Having a comment at the top of the file that complies with the instructions.
  • All @@@ comments have been complied with and removed.
  • Submission follows all instructions and is on time.
25 smallestInt passes its tests and is written with good style
25 indexOfSmallestInt passes its tests and is written with good style
25 longestString passes its tests and is written with good style
25 indexOfShortestString passes its tests and is written with good style

Due Date: Friday November 5, 5pm (same as lab07)

Copyright 2010, Phillip T. Conrad, CS Dept, UC Santa Barbara. Permission to copy for non-commercial, non-profit, educational purposes granted, provided appropriate credit is given; all other rights reserved.