Question: Following Section 4.9, develop a program that reads text and displays the average number of words in each sentence. Assume words are separated by spaces,
Following Section 4.9, develop a program that reads text and displays the average number of words in each sentence. Assume words are separated by spaces, and a sentence ends when a word ends in a period. Start small and just print the first word. Then print the first two words. Then print all words in the first sentence. Then print the number of words in the first sentence. Then print the number of words in the first two sentences. Then print the average number of words in the first two sentences. At this time, you should have gathered enough experience that you can complete the program.
Step by Step Solution
3.40 Rating (181 Votes )
There are 3 Steps involved in it
To complete this program you will need to perform the following steps Read in the text from some sou... View full answer
Get step-by-step solutions from verified subject matter experts
