In this first phase of the project you will be writing a Python application that will read email data from a file and you will be counting the occurrences of emails from specific users.
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
- Looking for lines of the form:
- From s..email@example.com Sat Jan 5 09:14:16 2008
- Prompt the user to enter three different email addresses (these are the email addresses you will read from the file)
- Count these lines where the email address matches one of the three email addresses you searched for.
- You should have a separate counter variable for each of the 3 email addresses you are finding.
- Print out the count for each of the three email addresses after the program has completed execution.
- You can download the data at mbox.txt when you are testing enter mbox.txt as the file name.
- To find out what email addresses to test with, go to the Simple Python Application Quiz which is next in the module. You will be given 3 email addresses to search for and prompted to enter the count you got for each of the email addresses (a portion of the grade for this assignment will be to get the counts correct).
- You will be time limited so be sure your program is ready to run when you start the quiz.
- You can take the quiz again if your program crashes, but chances are you will get a different set of emails if you need to test again.