Discussion Questions in APA format
January 24, 2020
MGMT 510 Hw 2
January 24, 2020
Show all

Python program

Write a Python program called wdcount.py which uses a dictionary to count the number of occurrences of each word (ignoring case)in a file. Note that the input file name is given from the command line. To make it simple , you may assuime that the file doesnt contain any punctuation  character .Your program firstly prints the number of different words and the total number of words in the file. Next, your program should print the word which has more than 4 characters along with its number of occurrences( in descending order. )That is, the most frequent word should be printed first. Next your program prints the no of different words and the total no of words in the file.

Leave a Reply

Your email address will not be published. Required fields are marked *