Python

k_931

Golf Scores

1. A program that will read each player’s name and golf score as keyboard input, and then save these as records in a file named golf.txt. (Each record will have a field for the player’s name and a field for the player’s score.)

The input function should contain a sentinel loop.  The input of a score of negative 1 should terminate the input process and write an error message.

2. A program that reads the records from the golf.txt file and displays them. At the end of displaying all of the individual scores, the program should display the following:

Average of all scores

The name and score of the player with the highest score

The name and score of the player with the lowest score

  • 7 years ago
  • 20
Answer(2)

Purchase the answer to view it

NOT RATED
  • golf.txt
  • golfScores_1.py
  • golfScores_2.py

Purchase the answer to view it

NOT RATED
  • golf.txt
  • Q1.py
  • Q2.py