Lesson 8: A fork in the road
Outline:
- Lovelace
- Questions?
- Recap Lesson 7
- multi-way conditionals: Exercise 1
- conditionals with loops: Exercise 2
- Multi-way decisions
- Project proposals
Explore after class:
- More practice with conditional code:
- write a function to ask the user for three numbers, and print out how many of them are even
- extend the above function: Exercise 3
- more practice looping with conditionals: Exercise 4
Want more practice?
- Runestone:
- reading: Nested
ifstatements - reading:
if-elif-else - reading: Accumulator pattern with
if - reading: Planning code with conditionals
- reading: Nested
What’s next
Upcoming events/assessments:
- CS Bits and Bytes tomorrow at 3:30pm in Anderson 329: CS Summer Research Students
- Homework assignment 3 is due tomorrow!
What you should do now:
- The readings (see below)
- Work on Assignment 3, trying to complete Parts 1–3 today and Part 4 tomorrow
Reading assignment (to be completed by the next class):
- Zelle sections 6.5–6.6 (pp. 183–192)