Outline for November 24, 2020
Reading
: §4
Due
: Homework 4, due December 1, 2020
Example: reading in a dictionary [
abbrev.py
]
Program to replace abbreviations with expansions
Version 1: read in a file
Version 2: split line into 2 parts separated by a tab character
Version 3: create a dictionary with abbreviations as keys and expansions as values
Version 4: read in input line and split it into words
Version 5: substitute the expressions for the abbreviations and print the line
Version 6: make loading the dictionary a functon
Version 7: add to the dictionary numbers as keys and their words as values
Version 8: have the function return a dictionary (so there are two dictionaries)
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.