String manipulation enables interesting approaches to analyzing the writing of great authors. Much attention has been focused
Question:
String manipulation enables interesting approaches to analyzing the writing of great authors. Much attention has been focused on whether William Shakespeare ever lived. Some scholars believe there’s substantial evidence indicating that Christopher Marlowe actually penned the masterpieces attributed to Shakespeare. Researchers have used computers to find similarities in the writing of these two authors. This exercise examines three methods for analyzing texts with a computer. Read a line of text from the keyboard and then perform the following tasks:
a) Calculate and print a table indicating the number of occurrences of each letter of the alphabet in the text.
b) Calculate and print the number of one-letter words, two-letter words, three-letter words, and so on, appearing in the text.
c) Calculate and print the number of occurrences of each different word in the text. The program should print the words in the table in the same order in which they appear in the text.
Business Statistics
ISBN: 978-0321925831
3rd edition
Authors: Norean Sharpe, Richard Veaux, Paul Velleman