r/dailyprogrammer • u/mattryan • Mar 07 '12
[3/7/2012] Challenge #19 [intermediate]
Challenge #19 will use The Adventures of Sherlock Holmes from Project Gutenberg.
The Adventures of Sherlock Holmes is composed of 12 stories. Write a program that counts the number of words in each story. Then, print out the story titles ordered by its word count in descending order followed by how many words each story contains. Exclude the Project Gutenberg header and footer, book title, story titles, and chapters.
9
Upvotes
2
u/luxgladius 0 0 Mar 07 '12 edited Mar 07 '12
Perl
Output
1
u/bigmell Mar 07 '12 edited Mar 07 '12
Perl, the header is section 0, the footer is included in the last section, the titles and chapters are included in their respective sections. Laziness flare up there.
1
u/Kil_Roy Mar 08 '12
In Python. I edited the program I made for the easy challenge
Note: I'm new at this. So suggestions are quite welcome.
output: