Warning This class is being recorded (and transcribed), provided Sam remembered to hit the “Record” button.
Approximate overview
Academic
Cultural
Peer
Wellness
Misc
The color 128,32,8 gives the value 8 after running our formula. 8 is h (I think). We want to modify the color so that it gives the value 3 (c). What new/similar color will work? We need to subtract 5. (123, 32, 8) will work. (122, 33, 8) would also work, but it’s even further from our original color. We could also use (125,31,7)
Let’s check
> (remainder (+ 125 31 7) 32)
3
I could also add 27, (137, 41, 17)
> (remainder (+ 137 41 17) 32)
3
Did 2nd years get priority for CSC-161?
Yes, but we may need to update again to clarify that it’s all prospective CS majors. If you are a second-year student already have another declared major, and intend to add a CS major, please drop a note to registrar@grinnell.edu to that effect.
Why does roll-a-die have a lambda with an empty parameter list?
(define roll-a-die
(lambda ()
(random 1 7)))
Because we want a procedure, something that does new work each time. Otherwise, we’d be defining a value that is unchangeable (at least for one run of the program).
(define random-die
(random 1 7))
What are Sam’s favorite things about this lab?
pair-a-diceis a wonderfully horrible pun.
“Rolling Rolling Rolling” brings to mind (a) Tina Turner (or John Fogerty) singing “Proud Mary” and (b) John Belushi singing “Rawhide” in “The Blues Brothers”.
The behavior of random procedures requires some subtlety in understanding.