I have a file which contains two columns, name of students and
average. I would like to read in the name and average,
re-calculate the new average based on the latest test score and
write the new average to the file. I know how to do the first two
parts (reading the name and average and calculating the new
average). How do I do the last part, i.e. write the new average to
the file?
here is a sample file
---------------------------------
#comment: this is a sample file
student1 average1
student2 average2
student3 average3
average. I would like to read in the name and average,
re-calculate the new average based on the latest test score and
write the new average to the file. I know how to do the first two
parts (reading the name and average and calculating the new
average). How do I do the last part, i.e. write the new average to
the file?
here is a sample file
---------------------------------
#comment: this is a sample file
student1 average1
student2 average2
student3 average3
Comment