Assignment objectives:

  • Strings
  • Text file I/O

Description

Write a program that asks the user for 4 names and 4 score for test (0 to 100), write the names with corresponding score to a file. Read the file and find the average, the lowest and the highest score and display them. If the name that the user enters is "Vader" then assign a score of 100 regardless of what the user enters for Vader's score.

User input:

4 names and 4 test scores:

Example:
John 78
Mary 99
Sam 86
Judy 70

Output:

Test average is: 83.2
Mary has the highest score: 99
Judy has the lowest score: 78
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.