Functional Problem Solving (CSC 151 2014S) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Partners] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Setup] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2010S)] [Rebelsky (2013F)] [Weinman (2012F)] [Weinman (2014S)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)]
Overview
What is on tomorrow's quiz?
Quizzes are cumulative, but tend to focus on recent topics.
This week's "recent topics" are drawings as values, procedures. We'll probably either give you a drawing and ask for code, or give you a code and ask for the drawing. We'll also ask you to write a procedure.
We won't ask anything hard about
modulo, although mod is useful for cycling through values.
Why did you make us learn symbols if we're not really using them?
Um ... tradition?
Could you explain a bit more about modulus?
I think of modulus as a nice way of cycling through numbers. We count up to the modulus. When we reach the modulus, we go back to zero, without writing the modulus
(modulo x y)
x: ... -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 ...
(mod x 3) 1 2 0 1 2 0 1 2 0 1 2 0 1 2
(mod x 4) 0 1 2 3 0 1 2 3 0 ...
Alternately: It's like "positive remainder"
Can you explain the image-show thing?
We will be working with more than one model of what a picture is.
An
imageis something we can easily display. And we present them as numbers.Drawings need to be converted to images with
drawing->image.
How about with lambda?
Eventually, we get sick of typing image-show and drawing->image, so we define a procedure to help out.
(define small-preview
(lambda (drawing)
(image-show (drawing->image drawing 100 100))))
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Partners] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Partners] [Readings]
Reference: [Setup] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2010S)] [Rebelsky (2013F)] [Weinman (2012F)] [Weinman (2014S)]
Misc: [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] [Issue Tracker (Course)]
Samuel A. Rebelsky, rebelsky@grinnell.edu
Copyright (c) 2007-2014 Janet Davis, Samuel A. Rebelsky, and Jerod Weinman. (Selected materials are copyright by John David Stone or Henry Walker and are used with permission.)

This work is licensed under a Creative Commons Attribution 3.0 Unported License. To view a copy of this
license, visit http://creativecommons.org/licenses/by-nc/3.0/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor,
San Francisco, California, 94105, USA.