Textbook section
Week 3: Functions
Read the chapters for Week 3 as clean web pages with navigation, code blocks, and section links.
Ch. 11: Why Functions? Defining and CallingChapter 11: Why Functions? Defining and CallingImagine you're writing a program that needs to check, at several different
Ch. 12: Parameters and ArgumentsChapter 12: Parameters and ArgumentsThese two words are often used loosely, but it's worth being precise:
Ch. 13: Return Values and ScopeChapter 13: Return Values and ScopeThis is, without exaggeration, one of the most important distinctions in
Ch. 14: Specifications, Docstrings, and DecompositionChapter 14: Specifications, Docstrings, and DecompositionImagine you ask a friend to "write a function that finds the largest
Ch. 15: Functions Calling FunctionsChapter 15: Functions Calling FunctionsYou've already seen this happen in passing (Chapter 13's tip calculator,