more
This commit is contained in:
16
7-word-count/README.md
Normal file
16
7-word-count/README.md
Normal file
@ -0,0 +1,16 @@
|
||||
File Word Count
|
||||
================
|
||||
|
||||
Write a program that takes a filename and a parameter `n` and prints the `n` most common words in the file, and the count of their occurrences, in descending order.
|
||||
|
||||
For example:
|
||||
|
||||
word_stats("article.txt", 5)
|
||||
|
||||
"the", 39
|
||||
"device", 21
|
||||
"start", 14
|
||||
"pidgeon", 9
|
||||
"box", 3
|
||||
|
||||
Import the included `article.txt` file and use that to test your program. What are the top 10 words and their frequency?
|
Reference in New Issue
Block a user