Question: 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:

  1. Prompt for a file name
  2. Opens that file and reads through the file
  3. Displays a custom error message if the file does not exist
  4. 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
  5. Accumulated the counts for each hour (key)
  6. 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
  7. You can download the data at mbox.txtI am new to Python and am having trouble coming up withwriting code to the following problem... The program must: Prompt for a when you are testing enter mbox.txt as the file name.
  8. 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.
  9. 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

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 Databases Questions!