Outline for January 20, 2012

Reading: §4

  1. Assignment [swap.py]
    1. Simple assignment: variable = expression
    2. Simultaneous assignment: variableA, variableB = expressionA, expressionB
  2. Functions [hello.py]
    1. What functions are
    2. Defining them
  3. Returning values from functions [calc.py]
    1. Use of return statement
    2. Example: doing error checking in it to be simple
    3. Passing values back through parameters (cannot do it directly; more later)

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