Overview

Functions are very powerful, but also have aspects of them that can be particularly confusing. Today we are focusing on a few of these: how returning really works, thinking more about scope, and how functions can impact mutable objects like lists.

Basic Learning Objectives:

Before class, you should be able to:

  • Write a simple function that returns a value
  • Define the meaning of scope and local variable
  • Explain how functions can impact mutable objects

Advanced Learning Objectives:

After class, you should be able to:

  • Write and use multiple functions that return values to solve a problem
  • Use local variables within functions correctly
  • Write a function that changes a list without needing to return it

Resources

You should read/watch the following and complete the embedded checks: