Lesson 8: The function of functions
Outline:
- The function of functions
- defining a function
- passing parameters
- Exercise 1
- Functions that return values
- the
return
keyword - Exercise 3
- the
- Recap: values and side effects
Explore after class:
- More practice with functions
Want more practice?
- Runestone:
- Function calls
- Function parameters
- Function return values (note: we haven’t seen conditionals like
if
yet, but that’ll come Friday!)
- Codingbat:
- Strings
- Lists
- Others: string_times, string_bits, string_splosion, big_diff
Reading assignment (to be completed by the next class):
- Zelle sections 6.1-6.5 (pp. 175-193)