Lesson 9: Making decisions
Outline:
- Recap Lesson 8
- A bit more about functions
- Variable scope
- Returning multiple values
- Exercise 2
- Modifying parameters
- Making choices
- Condition expressions in Python
- Exercise 4
- The
if
keyword - Two-way decisions:
if
/else
Explore after class:
- Practice with functions that modify their parameters: Exercise 3
- Practice with conditional code: Exercises 5+6
Reading assignment (to be completed by the next class):
- Zelle sections 6.6-6.8 (pp. 193-203)
- Zelle sections 7.1-7.2 (pp. 209-220)