Functional Problem Solving (CSC 151 2014F) : EBoards
Primary: [Front Door] [Schedule] - [Academic Honesty] [Disabilities] [Email] - [FAQ] [Teaching & Learning] [Grading] [Rubric] - [Calendar]
Current: [Assignment] [EBoard] [Lab] [Outline] [Reading]
Sections: [Assignments] [EBoards] [Examples] [Handouts] [Labs] [Outlines] [Readings]
Reference: [Setup] [VM] [Errors] - [Functions A-Z] [Functions By Topic] - [Racket] [Scheme Report (R5RS)] [R6RS] [TSPL4]
Related Courses: [Davis (2013F)] [Rebelsky (2014S)] [Weinman (2014F)]
Misc: [Submit Questions] - [SamR] [Glimmer Labs] [CS@Grinnell] [Grinnell] - [Issue Tracker (Course)]
Overview
Some good comments on doing well on the exam (from exam 1 epilogues and exam 2 prologues).
Can we use car and cdr on the exam?
Yes, but I don't think they'll be useful.
Can we use recursion on the exam?
Yes, except on problems in which it is explicitly forbidden, such as problem 5. Recursion will also lead to a longer solution to problem 4 than we'd like.
The exam does not need recursion.
Is it really okay that (product null) is 1?
Yes. We were okay that
(sum null)is0.0is the additive identity and1is the multiplicative identity.
Can I make the base case test in product something like "if there is
one element in the list?"
Yes. You'd use the following pattern
(if (null? (cdr numbers))
CONSEQUENT
ALTERNATE)