[Tutor] Reading Data From File

Chris Castillo ctcast at gmail.com
Sat Jul 25 08:40:00 CEST 2009


Okay I really need help with the program I am writing. I've can't seem to
figure out what I need to do and have tried several different methods.

I need to read in a text file in python that contains the following:

Student Name  ( could be unknown amount in file )
Numeric Grade  ( could be unknown amount in file also )
Numeric Grade
Numeric Grade
0 (zero value to terminate and move on to next student and their grades)

I need to print the following to the screen:
Student Name    Numeric Grade, Numeric Grade, Numeric grade, etc.. - ( then
A, B C, D, or F average )

PLEASE HELP ME. I need to put the grades into a list and process each
student's grades before processing the next student's grades so that I can
print each Name, their grades, and average on the same line ( like above ).
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090725/b5759360/attachment-0001.htm>


More information about the Tutor mailing list