Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ANSWER NEEDED IN PYTHON THINK, PAIR, SHARE #2 - BUILD A DICTIONARY TO STORE FREQUENCY DATA Write a program that categorizes each mail message by
ANSWER NEEDED IN PYTHON
THINK, PAIR, SHARE \#2 - BUILD A DICTIONARY TO STORE FREQUENCY DATA Write a program that categorizes each mail message by which day of the week the commit was done. To do this, look for lines that start with "From". Then, look for the third word, and keep a running count of each of the days of the week. At the end of the program, print out the contents of the dictionary mail count (order does not matter). For example, mail count['Mon'] should be 2. Use the following list as your data: mail = ['From lacher@uhcl.edu Sat Jan 7', 'From gopal.ramasammycook@gmail.com Thurs Jan 5', 'From louis@media.berkeley.edu Tues Jan 3', 'From antranig@uhcl.edu Sat Jan 7', 'From david.horwitz@yahoo.com Wed Jan 4', 'From ray@media.berkeley.edu Mon Jan 2', 'From lacher@uhcl.edu Mon Jan 2', 'From wagnermr@uh.edu Fri Jan 6']Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started