Question: I'm new to learning Python (using Python 3.6.) I found some practice problems, including the following, that I'm having some trouble with. There are a
I'm new to learning Python (using Python 3.6.) I found some practice problems, including the following, that I'm having some trouble with. There are a couple separate .txt file provided to use with the problem to pull pull the information from (sample.txt & sample-short.txt). I can't seem to visualize the code or process from the instructions given, especially when it comes to indentation. I would really appreciate any help with the code itself, as well as any additional information, like as explaination of each step in the code.
............................................................................................
Write a program that categorizes each mail message by which day of the week it was done. To do this, look for lines which start with From, then look for the third word and then keep a running count of each of the days of the week. At the end of the program print out the contents of your dictionary (order does not matter).
Sample Line: 'From david.stevens@asu.ac.ca Mon Feb 10 08:15:16 2012'
The program A should have the follow functionalities:
1. Program should prompt the user to enter for a file name (sample-short.txt / sample.txt)
2. Program also find line that starts with From
3. Program looks for the third word, which is the data (Fri, Thu, Sat)
4. Program keeps keep a running count of each of the days of the week
5. Print out the contents of your dictionary
Sample Execution:
Enter a file name: sample-short.txt {Fri: 20, Thu: 6, Sat: 1}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
