Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I am new to Python and am having trouble coming up with writing code to the following problem... The program must: Prompt for a file
I am new to Python and am having trouble coming up with writing code to the following problem...
The program must:
- Prompt for a file name
- Opens that file and reads through the file
- Displays a custom error message if the file does not exist
- You can pull the hour out from the 'From ' line by finding the time and then splitting the string a second time using a colon. From stephen.marquard@uct.ac.za Sat Jan 5 09:14:16 2008
- Accumulated the counts for each hour (key)
- Print out the count for each of the hours after the program has completed execution. The counts should be sorted by hour as shown below. 00 13 01 17 02 01 03 29
- You can download the data at mbox.txt when you are testing enter mbox.txt as the file name.
- Following execution of the program, begin the quiz for this assignment Python Data Structures.
- You will be asked to enter the counts for three of the hours your application displays (a portion of the grade for this assignment will be to get the counts correct).
- You can take the quiz again if you get the counts incorrect.
- You must upload your final code as a TEXT file in the question at the bottom of the quiz to receive points for the code. Make sure the filename includes your name
Transcribed image text
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