Outline for November 24, 2020

Reading: §4
Due: Homework 4, due December 1, 2020

  1. Example: reading in a dictionary [abbrev.py]
    1. Program to replace abbreviations with expansions
    2. Version 1: read in a file
    3. Version 2: split line into 2 parts separated by a tab character
    4. Version 3: create a dictionary with abbreviations as keys and expansions as values
    5. Version 4: read in input line and split it into words
    6. Version 5: substitute the expressions for the abbreviations and print the line
    7. Version 6: make loading the dictionary a functon
    8. Version 7: add to the dictionary numbers as keys and their words as values
    9. Version 8: have the function return a dictionary (so there are two dictionaries)

UC Davis sigil
Matt Bishop
Office: 2209 Watershed Sciences
Phone: +1 (530) 752-8060
Email: mabishop@ucdavis.edu
MHI 289I, Programming for Health Informatics
Version of November 24, 2020 at 10:50PM

You can also obtain a PDF version of this.

Valid HTML 4.01 Transitional Built with BBEdit Built on a Macintosh