CSC151.01 2006S, Class 22: Discussion of Exam 1 Admin: * EC * Tuesday Extra: Installing Linux. 1:00 p.m. 2424. Snacks at 12:45 * Wednesday and Friday this week: A Short Project. * Reading for Tuesday: Randomness and Simulations Overview: * Notes on Homework 8 * Notes on exam 1. * Time to work on the Local Procedures Lab. /Notes on Homework 8/ * (intersect (list 'a 'b 'c) (list 'd 'd 'b 'a)) * Can be (a b) * Can be (b a) * How do we write a test? (test! (member? 'a (intersect ...)) #t) (test! (member? 'b (intersect ...)) #t) (test! (length (intersect ...)) 2) * Use test-permutation! (test-permutation! (intersect ...) (list 'a 'b)) * Should 5 and 5.0 be the same for the purposes of this homework? * No, they are not the same in general. Exact numbers should not be the same as inexact numbers. * IRRELEVANT: The assignment says "lists of symbols" * Do we need to check preconditions? * Nah. /Notes on Exam 1/ * Policy: I return your exams after discussing them. * If you did poorly, make an appointment with me * Think about Tutors * Think about regular appointment with Sam * Big picture issues: * Use whitespace, please * Theadventofaspacemadeitmucheasiertoreadsequencesofwords * Lng g w lrnd t s vwls * Use tab to format (select all, hit tab) //Problem 1: type-of// * A fancy way to write * What types have you learned, and what are the predicates for those types? * What is the "hierarchy" of numbers? * Danger of test-driven development