Fundamentals of CS I (CS151 2001S) : Outlines
[Current]
[Discussions]
[Glance]
[Honesty]
[Instructions]
[Links]
[News]
[Search]
[Syllabus]
Primary
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Quizzes]
[Readings]
[Reference]
Sets
[Blackboard]
[Scheme Report]
[SamR's Schedule]
[Rebelsky/Fall 2000]
[Walker/Fall2000]
[Stone/Spring2000]
Links
Reading: Boolean values. Reading: Conditionals. Back to Procedure Definitions. On to Conditionals Lab.
Held Friday, February 2, 2001
Summary
Today we begin to learn how to tell Scheme to make decisions. The procedures used to make decisions are called conditionals.
Due
Notes
http://www.cs.grinnell.edu/~schriebe/hub.html
(Makinen, Martin, and Schrieber): Reviews of introductory
computer science courses (and how easy it is to find info
on the courses at various institutions).
http://www.cs.grinnell.edu/~walkerxh/hmwk1.html
(Eilert, Heinz, Walker): Reflections on starting CS.
http://www.cs.grinnell.edu/~nusswarr/hw1/
(DeVilder, Gamboa, and Nuss-Warren): Basic programming
strategies.
http://www.cs.grinnell.edu/~waymouth/website/index.html
(Kase and Waymouth): Scheme commands.
http://www.math.grin.edu/~farrow/index2.html
(Farrow and Hodgman): An introduction to Scheme.
http://www.math.grinnell.edu/~hernanda/index.html
(Hernández and Ipatova): Exploring Scheme and CS.
Overview
ifif. For example,
if the grade is at least 94, then give the student an A, otherwise, if the grade is between 90 and 93, ...
(if condition
success-expression
failure-expression)
if does not behave according to
Marie's evaluation pattern (in which all the arguments
to a procedure are computed before the procedure is applied).
(if (>= grade 94) 'A 'F)
(if (>= grade 94)
'A
(if (<= 90 grade 93)
'Aminus
(if (<= 87 grade 90)
...)))
cond, which more closely resembles a table.
cond expression looks like
(cond ((condition1) exp1) ((condition2) exp2) ((condition3) exp3) ... (else default-exp))
(cond ((>= grade 94) 'A) ((<= 90 grade 93) 'Aminus) ...)
Friday, 12 January 2001
Thursday, 1 February 2001
Back to Procedure Definitions. On to Conditionals Lab.
[Current]
[Discussions]
[Glance]
[Honesty]
[Instructions]
[Links]
[News]
[Search]
[Syllabus]
Primary
[Examples]
[Exams]
[Handouts]
[Homework]
[Labs]
[Outlines]
[Quizzes]
[Readings]
[Reference]
Sets
[Blackboard]
[Scheme Report]
[SamR's Schedule]
[Rebelsky/Fall 2000]
[Walker/Fall2000]
[Stone/Spring2000]
Links
Disclaimer: I usually create these pages on the fly. This means that they are rarely proofread and may contain bad grammar and incorrect details. It also means that I may update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.
This page was generated by Siteweaver on Wed May 5 12:14:49 2004.
This page may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2001S/outline.08.html.
You may validate
this page's HTML.
The source was last modified Thu Feb 1 20:48:24 2001.