[Tutor] MAXIMUM LOOP LOGIC

medusa magicwizardstar at gmail.com
Wed Oct 3 06:11:25 CEST 2012


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 at iupui.edu :5
Enter a file name: mbox.txt
 zqian at umich.edu :195

 

Instead of printing off a number beside the email, i got another email and i
dont know how to fix it.
<http://python.6.n6.nabble.com/file/n4990842/9.4_stuck.png> 




--
View this message in context: http://python.6.n6.nabble.com/MAXIMUM-LOOP-LOGIC-tp4990842.html
Sent from the Python - tutor mailing list archive at Nabble.com.


More information about the Tutor mailing list