Quantcast

MAXIMUM LOOP LOGIC

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

MAXIMUM LOOP LOGIC

medusa
This post has NOT been accepted by the mailing list yet.
Hello

i got stuck with the last bit of my programming practice.

Can somebody help me?

Write a program to read through a mail log, and figure out who had the most
messages in the file. The program looks for “From” lines and takes the second parameter on
 those lines as the person who sent the mail.
The program creates a Python dictionary that maps the sender’s address to the total number of
messages for that person.
After all the data has been read the program looks through the dictionary using a maximum loop
 (see Section 5.7.2) to find who has the most messages and how many messages the person has.


Enter a file name: mbox-short.txt
cwen@iupui.edu :5
Enter a file name: mbox.txt
 zqian@umich.edu :195

 

Instead of printing off a number beside the email, i got another email and i dont know how to fix it.

Loading...