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
modmodmod or remainder affect more than the sign?`Consider 7 and 4.
(mod 7 4) 3 (mod -7 4) 1 (mod 7 -4) -1 (mod -7 -4) -3 (remainder 7 4) 3 (remainder -7 4) -3 (remainder 7 -4) 3 (remainder -7 -4) -3
Let's divide -7 by 4.
mod and remainder for cycles, why would we use one over
the other?
mod only cycles through non-negative
numbers, and the cycles go in the same directionremainder cycles one way for
positive dividends and the other for negative dividends, and the
signs of the values in the two cycles are opposite.mod to cycle.10 minutes. If you finish early, start setting up for the lab (but wait for your partner to do the real work). Read the reading again if you have nothing else to do.