Question: Task Write a program called test 3 . py that reads the provided file and reports the following information about Elon Musk's tweets: The total

Task
Write a program called
test
3
.
py that reads the provided file and reports the following information about Elon Musk's
tweets:
The total number of tweets
The tweet that contains the most words
(
don
t use cleanedup for preprocessing here
)
Finally, a username is a word that starts with an @ symbol
(
for example, @MarkTwain
)
.
For simplicity, we will
assume that any word that contains @ at any position is a username
(
that is
,
consider Mark@Twain or
@Mark@Twain@ to be valid usernames
)
.
Your program should compile the information on how many times different
usernames are mentioned in Elon Musk's tweets, then provide an interface that allows a user to quickly look up how
many times any particular username is mentioned.
To obtain good results in the last part, cleanup the tweets before processing its words
(
lowercase all
letters and remove all punctuation except @
)
The program cannot include regular expressions,lambda functions or strip functionsTask
Write a program called
test3.py that reads the provided file and reports the following information about Elon Musk's
tweets:
The total number of tweets
The tweet that contains the most words (dont use cleanedup for preprocessing here)
Finally, a username is a word that starts with an @ symbol (for example, @MarkTwain). For simplicity, we will
assume that any word that contains @ at any position is a username (that is, consider Mark@Twain or
@Mark@Twain@ to be valid usernames). Your program should compile the information on how many times different
usernames are mentioned in Elon Musk's tweets, then provide an interface that allows a user to quickly look up how
many times any particular username is mentioned.
To obtain good results in the last part, cleanup the tweets before processing its words (lowercase all
letters and remove all punctuation except @)
Example of running the program
Task Write a program called test 3 . py that

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!