CSC151 2007S, Class 38: Discussion of Exam 2 Admin: * Exam 2 returned at the end of class. * Due: HW 11 * If you were confused as to the due date you may turn it in tomorrow. * Homework 12 should be ready this afternoon. * The next reading should also be available this afternoon. * Paden gets EC for having to make annoying phone calls for Sam Overview: * General issues. * Problem 4. * Problem 3. * Problem 2. * Problem 1. /General Issues/ (1) Some of you had trouble with the Six P's, or Sam's insane expectations of precise form ;;; Procedure: ;;; foo ;;; Purpose: ;;; To illustrate the six P's. Do not devolve into the following (or anything close to it) ; Procedure: foo ; Purpose: To ; illustrate the ; six ; Ps In the produces section, I expect you to name the result ;;; Procedure: ;;; ratio-of-odds-to-evens ;;; ... ;;; Produces: ;;; rat, a rational number In the postconditions, I expect something fairly formal ;;; Postconditions: ;;; Let evens be the number of even numbers in lst ;;; Let odds be the number of odd numbers in lst ;;; rat = odds/evens (2) Try not to repeat code If you're repeating yourself, you can probably be more concise And concision is nice (3) Answers are not to be posted online. Ask for a copy if you'd like one (AND DO NOT POST IT AFTERWARDS and DO NOT PUT IT IN YOUR FRATERNITY'S FILES)