Python Foundations · Unit 3
Unit 3: Functions
Write reusable functions with parameters, return values and scope.
Lessons
- What Are FunctionsWhat functions are, why functions are useful, when to use functions, built-in functions
- Defining and Calling FunctionsHow to define functions, function syntax, how to call functions, function naming
- Parameters and ArgumentsWhat parameters are, what arguments are, the difference, multiple parameters
- Return StatementsWhat return does, using return values, return vs print, functions without return
- Variable Scope & LifetimeLocal vs global variables, variable scope, variable lifetime, best practices
- Default & Optional ParametersDefault parameter values, optional parameters, calling with defaults, best practices
- Docstrings & DocumentationWhat docstrings are, writing docstrings, accessing docstrings, best practices
- Nested & Helper FunctionsNested functions, helper functions, scope in nested functions, when to use them
- Lambda FunctionsWhat lambda functions are, lambda syntax, using lambdas, lambda vs regular functions
- Practical Function ExamplesCombining concepts, real-world applications, code organization, best practices
-
Take the Unit 3 test
End of unit test
Ten multiple choice questions worth 7 points each and one free response problem worth 30, so 100 in total. Score 70 or more to finish Unit 3 and unlock Unit 4.