CSC151.01 2006S, Class 07: Characters and Strings Admin: * Groups continue from yesterday. Since Mr. Wood is not available on Tuesdays, Mr. Thompson will work with Mr. LaRue and Mr. Bonnin Cadogan. * I will record attendance on the eboard. If you object to your name appearing in this context, please let me know. * Assigned: HW4. * Reading: Writing Your Own Procedures * Due: HW3. * Extra credit: * Tuesday extra (Today 12:45-2:00 p.m. in Science 2424) * Convo (11-noon, Thursday, Herrick) * Blood Drive on Friday * Other announcements? Overview: * Additional lessons from yesterday. * What did you think of "Round Robin Review"? * Think about how your windows are arranged. * Think about how you explore procedures. * Think about how you interact with DrScheme. * More on modulo vs. remainder * Questions on the readings? * Lab. /Lessons from Monday/ * What does quotient do? * It divides two numbers and gives you back a whole number without a remainder * Correction: It divides two *integers*! * Exact or inexact? * Moral one: You should check these things. * What's the relationship between remainder and modulo? * They deal with negative numbers differently. * modulo takes two numbers and figures out how much is left over (how much you have to add or subtract) after you divide the first by the second * remainder will only add * Background: modulo is a mathematical concept a is equivalent to b mod c if (a-b) is evenly divisble by c * Rule in Scheme: modulo returns a value of the same sign as the divisor Given X and Y, express X as q*Y + r 0 <= r < Y Suppose X=5 and Y is 2, X=3*2 + -1 (q=3, r-1) For modulo, we want the sign to be the same. -|Y| < r < |Y| TYPO IN READING 'number-->gt;string' should be 'number->string' (Sam sometimes get HTML formatting wrong.) For those who asked, #\31 is "The unit separator", a funky control character.