Lecture: Abstracting with Functions
Slides
This deck of slides will be covered over two lectures and the lab that's in between them.
There's no need to read all of the slides at once. Pace yourself. Here's a suggestion:
-
For the first lecture, read until the end of the RETURN VS. PRINT section.
- For the lab and second lecture, read the remaining slides.
Readings
- Think Python, Ch. 3: Functions
- Think Python, Ch. 6: Return Values (only sections 6.1, 6.2, and 6.4 for now)
Code
Click on this lec03_04_functions.zip link to download the .zip file to your computer.
Solutions (for after class)
Use these sample solutions for review only after you have completed the code exercises. You will learn much more by trying them first and comparing your approach with the solutions.