Functional Problem Solving (CSC 151 2014F) : Outlines
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)]
Held: Wednesday, 3 September 2014
Back to Outline 03 - An Introduction to Scheme. On to Outline 05 - Drawings as Values.
Summary
We explore a bit more about data in Scheme, particularly the ways in which our version of Scheme supports numbers.
Related Pages
Overview
Administrivia
modulo operation.+) on numbers and we
can use the string-append operation on strings.number?,
real?,
integer?,
exact?, and
inexact?.mod (modulo, modulus) operation is one of the trickier
operations we use in this class (and we use it a lot).mod is used to break up the number line into
even chunks.
Number line: -9 -8|-7 -6 -5 -4 -3 -2 -1| 0 1 2 3 4 5 6| 7 8 9 10 11 Modulo 7: 5 6| 0 1 2 3 4 5 6| 0 1 2 3 4 5 6| 0 1 2 3 4
(modulo i n) operation allows us to
cycle through the numbers between 0 and n-1.