Notes for Lecture 12 on November 10, 2020
Print Word Count
Design of a program to count input words
First version: using
if
statement
Variant of first version: using
get
method
Second version: output sorted in computer order
Third version: output sorted in dictionary order
Fourth version: output sorted by count
Also see
wfc-1.py
,
wfc-2.py
wfc-2a.py
wfc-3.py
wfc-4.py
Printing a File
First version
Matt Bishop
Office: 2209 Watershed Science
Phone: +1 (530) 752-8060
Email:
mabishop@ucdavis.edu