CSC151 2007S, Class 16: Boolean Values and Predicate Procedures Admin: * The joy of ice and snow: Students are stuck in Wisconsin, NE Iowa, the doctor's office, and who knows where else * Exam 1 and Quiz 3 returned. * If you needed the "There's more to life" option on the exam, you should try to see me some time this week. (Look at the exam answer key first.) * If you failed to write "There's more to life than CS" on the exam, I did not impose that policy. Catch me during or after class if you simply forgot. * Are there questions on assignment 4 * Partners! * Note that we are dealing with RGB colors. * Other questions. * Reading for tomorrow: Conditionals. * Office hours issues: * Normally: MTuWF 10-11, Tu 1:15-2:05, MF 2:15-3:05 * Today a.m.: Teaching the other section * Tomorrow: Yet another interview * Max and Emily switching hours * Emily tonight 8-9 * Max tomorrow 8-9 Overview: * Boolean values. * Predicates - Procedures that return Boolean values. * Combining booleans with and and or. * Lab ==Lab== Q: Where does the computation 0.3*red + 0.59*green +0.11*blue come from? A: It's based on how our eyes perceive the different components. We see green as much lighter than red, and red as much lighter than blue. (Different wavelengths => different brightness) I don't know the physical/biological issues I don't know whether the numbers are purely experimental or ... I don't know if color-blind people perceive them differently Q: WHat happpens with (rgb-light? 255 11 10) A: Well, rgb-light? expects one parameter and you've given it 3. Our Scheme interpreter is too stupid to notice you've provided the wrong number of parameters, so it ignores the 11 and 10 255 is a number, and therefore can be treated as an RGB color (this is a kind of black) You should have typed (rgb-light? (rgb-new 255 11 10))