Answered step by step
Verified Expert Solution
Link Copied!

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 PYTHONimage text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions