solution

Given a grades.txt file of grades on an exam, output a final_grades.txt file in which each score is curved such that the person with the highest score has a score of 100. If someone gets over 100 on the exam, curve all of the grades downward so that the highest score is a 100.

Sample Input 1 (File grades.txt)

FirstName LastName Grade Harry Potter 86 Ronald Weasley 85 Hermione Granger 98

Sample Output 1 (File final_grades.txt)

FirstName LastName Grade Harry Potter 88 Ronald Weasley 87 Hermione Granger 100

Sample Input 2 (File grades.txt)

FirstName LastName Grade Harry Potter 86 Ronald Weasley 85 Hermione Granger 110

Sample Output 2 (File final_grades.txt)

FirstName LastName Grade Harry Potter 76 Ronald Weasley 75 Hermione Granger 100

 
"Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!"
Looking for a Similar Assignment? Our Experts can help. Use the coupon code SAVE30 to get your first order at 30% off!

Hi there! Click one of our representatives below and we will get back to you as soon as possible.

Chat with us on WhatsApp