Write and document a Python script vocProg.py which takes an utterance-file described above as a command-line argument and computes and outputs a list (sorted in increasing chronological order by age) of the sets of words spoken for the first time by the child at each age represented in the file. Note that some ages may have no words that were spoken for the first time at that age. Your script must work on datafiles vocProg1.dat and vocProg2.dat to produce the output given in typescript-file vocProg.script. You may assume that all utterance-file are readable and formatted correctly.
Write and document a Python script socEval.py which, given an opinion file described above as a command-line argument, computes the group-opinion matrix M resulting from the specified sequence of opinions and outputs the final group opinions of all members of the group sorted in reverse order by group opinion value. Your script must work on datafiles socEval1.dat and socEval2.dat to produce the output given in typescript-file socEval.script. You may assume that all opinion files are readable and properly formatted.
In Question #1, you may find it useful to store word-age items in a dictionary (keyed on age) of sets (of words pronounced at that age).
In Question #2, you may find it useful to store the opinion-matrix as a dictionary (keyed on member-name X) of dictionaries (keyed on member-name Y with item-value M[X,Y]).
######################################################### ## CS 2500 (Fall 2008), Assignment #5, Question #1 ## ## Script File Name: vocProg.py ## ## Student Name: Todd Wareham ## ## Login Name: harold ## ## MUN #: 8008765 ## #########################################################You do not have to develop your code on our CS departmental systems. However, as your code will be compiled and tested on our CS departmental systems as part of the assignment marking process, you should ensure that your code compiles and runs correctly on at least one of these systems.
Created: October 10, 2008
Last Modified: October 10, 2008