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 doesn’t 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.
6 years ago 5
Answer(0)
other Questions(10)
- i have assignments out this book throughtout yhe semester
- Find 1 article on each of the following topics: the Digital Divide and the impact of the OLPC (One Laptop Per Child) initiative.
- Information Systems Discussions Question
- Finance Exam Risk & Return
- label all parts of sof speech label all the sentence parts/phrases identify the clauses and lable them then detirmine what type sentence...
- Revolution
- Josiah
- Address the role of women as army nurses. What opportunities did it create? Did it have a greater affect on one region than the other? Why or why not?
- with references
- Hamilton Company's beginning inventory and purchases during the fiscal year ended September 30, 20-2, were as follows: Use the following information...