Question: Develop a set of functions to analyze tweeter data. Specifically, write a program to prompt the user to enter a tweeter string. The program should

Develop a set of functions to analyze tweeter data. Specifically, write a program to prompt the user to enter a tweeter string. The program should develop a set of functions for the following string operations:
1. Word counter: count the number of words in the string and display it. For instance, for an input of I will complete MSDA in one year., the program should display 7 words. [5 points]
2. Average number of characters: calculate average number of characters in each word. For instance, this above string has 27 characters (excluding white spaces) and 7 words. The average is 27/7=3.86.[5 points]
3. Upper case letters: count upper case letters. They are 5 upper case letters in the above string. [5 points]
4. Lower case letters: count lower case letters. They are 21 lower case letters in the above string. [5 points]
5. Reverse the string: write a function named reverse() which should take a string and return the reversed string. [5 points]
6. String Stats: The program should count and display the number of alphabets (a to z, and A to Z)[5 points], number of digits (0 to 9)[5 points] and number of special characters (such as #, $, @)[5 points]. For this, write a function.
Use the following two tweet as test cases:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!