Feb-01-2018, 02:58 AM
1. Write a function, countWords(ifile) which takes an input file, ifile, and counts the number of occurrences for each word in the file. You must remove all punctuation except apostrophes. Return the sorted list of unique words and the count of the number of occurrences in that file.
4. Write a function, makeTable(ifile,ofile) which will take its input from ifile. Each line in the ifile is as follows. You must use the .format command for the table and average.
A string which includes leading and trailing spaces
A floating point number
A string which includes leading and training spaces
4. Write a function, makeTable(ifile,ofile) which will take its input from ifile. Each line in the ifile is as follows. You must use the .format command for the table and average.
A string which includes leading and trailing spaces
A floating point number
A string which includes leading and training spaces