15. Book
Exercise Notes / Advice
See the build-image tutorial. Use that to do 15.3.3 and
15.3.{7-10}. Do not use build3-image
even though the book says to use it. The build-image
function is better.
-
15.3.4: The first input is the candidate for whom you are counting votes. (For example “Clinton”.) The next four inputs are votes cast for a person. (For example “Trump” “Clinton” “Sanders” “Trump”.) You are supposed to return the number of votes for the candidate from the first input. (For example:
1
in this case.) -
15.3.7: Keep using
build-image
notbuild3-image
.
Assignments
Assignment 15.A
Read the first three sections of Chapter 15. Do Exercises 15.3.{3,4}. These are on PDF page 223.
Assignment 15.B
Exercises 15.3.{5-8}.
Assignment 15.C
Exercises 15.5.{1,2,3,4,5}. These begin on PDF page 229.
Assignment 15.D
Read 15.6 (“Unnecessary conditionals”). Skip Section 15.7.
Do Exercises 15.8.{2,3,5}. Exercise 15.5.6. These begin on the bottom of PDF page 238.