Decomposition, Abstraction, and Functions
At a glance
- Price Free to watch, no sign-up
- Runtime 46 min
- Topics Computer Science
- Source MIT, Introduction to CS and Programming using Python
- Lecture Lecture 7 of 25
- Language English
Ana Bell teaches lecture seven of MIT's 6.100L, Introduction to Computer Science and Programming Using Python, on how functions organize code. She explains functions as black boxes that suppress implementation detail from the user, taking zero or more inputs and producing a return value. The lecture covers how a function only executes when called, how the call expression is replaced by whatever it returns, and how decomposition lets a programmer break a large problem into smaller, reusable pieces. Abstraction and specification get particular attention: writing a function's docstring as a contract that describes what it does without requiring the caller to know how it works internally. Bell works through examples on the whiteboard and in Python to show scope, parameter passing, and return behavior in practice, building toward the idea that well-designed functions make larger programs easier to write, test, and reason about.