More on Functions and Mutables

Functions have added features such as default values and named parameters as well as the ability to handle an arbitrary number of arguments. We also take a look at how mutables and immutables behave differently when passed to functions.

Readings from the book The Practice of Computing Using Python.

Chapter 8: More on Functions

Videos

  1. Defaults and other features
  2. Default values and named parameters can be useful.

                 def name (param1 = XXX):
                    suite-of-statements 

    1. Function features (Video)
    2. Mutables as Parameters (Video)
  3. More on Mutables (Video)

Assignments

  1. Chapter 8 Exercises on Codio
  2. Project04