Lesson 5: The function of functions
Outline:
- Questions?
- The function of functions
- defining a function
- passing parameters
- Exercises 1+2
- Functions that return values
- the
returnkeyword: Exercise 3 - values and side effects: Exercise 4
- the
- Recap so far – prep for Quiz #1
Explore if you have time (or after class):
- More practice with functions
Want more practice?
- Runestone:
- Function calls
- Function parameters
- Function return values (note: we haven’t seen conditionals like
ifyet, but that’ll come next week!)
What’s next
Upcoming events/assessments:
- CS Bits and Bytes tomorrow at 3:30pm in Anderson 329: Networking 101
- Homework assignment 2 is due this tomorrow!
- Project partner selection is due next Monday!
What you should do now:
- The readings (see below)
- Try to complete Assignment 2 Part 2 today, and ask questions on CampusWire or in student hours today or Thursday (remote)
Reading assignment (to be completed by the next class):
- Zelle sections 5.1–5.6 (pp. 131–154)
- Zelle section 5.8 (pp. 158–159)