Outline for April 6, 2009

Reading: §2.4–2.5


  1. Variables
    1. What they are
    2. Names, identifiers
    3. Legal, illegal names
    4. Reserved words
  2. Expressions
    1. Operation, operand
    2. Operators +, −, *, /, %, **
    3. Name Errors
  3. Output: print statement
    1. Commas add space or suppress end of line
    2. Print with nothing after it prints a blank line
  4. Assignment
    1. Simple assignment: variable = expression
    2. Simultaneous assignment: variableA, variableB = expressionA, expressionB; example of use swap.py
  5. Input: input statement
    1. input(prompt) prints prompt, waits for user
    2. When user hits enter, it evaluates what user types and returns it