Answered step by step
Verified Expert Solution
Link Copied!

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:

  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.txtimage text in transcribedimage text in transcribed 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

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

Recommended Textbook for

Database Administration The Complete Guide To Dba Practices And Procedures

Authors: Craig S. Mullins

2nd Edition

0321822943, 978-0321822949

More Books

Students also viewed these Databases questions

Question

=+13.4. 1 Relate the result in Problem 13.3 to Theorem 5.1(ii).

Answered: 1 week ago