See slides for introductory material.
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
not build3-image
.
Read the first three sections of Chapter 15. Do Exercises 15.3.{3,4}. These are on PDF page 223.
Exercises 15.3.{5-8}.
Exercises 15.5.{1,2,3,4,5}. These begin on PDF page 229.
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.
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.
Get ready by doing an old Chapter 15 quiz.
Day 1 Exercises
Patterns with conditionals and build-image.
A beautiful image made with a conditional in build-image.
A review of graphing with people and computer coordinates.
Using cond to create a multi-segment heat map. Applying it to the graphing review.
Color pixels based on values of a function. Put contour lines every 50 values.
Practice quiz, adapted from a previous year.