Outline for October 5, 2012

Reading: § 3
Assignment Due: October 12, 2012 at 5:00PM

  1. Functions [hello.py]
    1. What functions are
    2. Defining them
    3. Using them
  2. Quick look at using them [quad.py]
    1. Passing values to functions
    2. Returning values from functions
  3. In more detail: passing values to functions [args.py]
    1. Formal parameters in subject definition
    2. Actual parameters (arguments)
    3. Matching arguments to formal parameters
    4. Local variables
  4. In more detail: how Python does function calls [quad.py]
    1. Caller suspends execution at point of call, remembers where it left off
    2. Formal parameters assigned values from actual parameters
    3. Execute function body
    4. Return control to where caller left off
  5. The right way to do quad.py [quad-c.py]

A PDF version is available here.
ECS 10, Basic Concepts of Computing
Fall Quarter 2012