Outline for April 17, 2009

Reading: §4.4–4.5


  1. Internal representation of characters as integers
    1. Each system chooses its own representation
    2. Now, almost all systems use ASCII or Unicode
    3. Conversion to and from numeric representation: ord(), chr() (see ord.py)
  2. Cæsar cipher
    1. How it works
    2. One form: caesar1.py
    3. Another form: caesar2.py
  3. 3. String functions and datecvt.py
    1. Conversion functions int() and eval()
    2. Date conversion method 1: using ranges
    3. Date conversion method 2: using split
    4. Date conversion method 3: indexing into lists
    5. Date conversion method 4: indexing into string using ranges