Question: In python, write a golf program that will read each player's name and golf score as keyboard input, and then save these as records in
In python, write a golf 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 have a field 's for the player's name and a field for the player's score.) and also reads the records from the golf.txt file and displays them. the program should follow the outline below
WRITING TO THE FILE main() Declare variables Input the name of the file to write to Ifthe number of players is valid The file can be found o o . When valid (above), enter names and scores o Determine if the score is valid . Close the file READING FROM THE FILE main() o Error message if file is not found o NOTE: read every other name and score () (.Ileas( ? ihe?.iile
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
