Question: 7 . 8 LAB: Word frequencies ( lists ) Write a program that first reads in the name of an input file and then reads
LAB: Word frequencies lists
Write a program that first reads in the name of an input file and then reads the file using the csvreader method. The file contains a list of words separated by commas. Your program should output the words and their frequencies the number of times each word appears in the file without any duplicates.
Ex: If the input is:
inputcsv
and the contents of input mathrmcsv are:
hello, cat,man, hey, dog,boy,Hello,man,cat,woman,dog, Cat, hey,boy
the output is:
hello
cat
man
hey
dog
boy
Hello
woman
Cat
Note: There is a newline at the end of the output, and inputcsv is available to download.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
