Question: PL.EASE HELP WITH THIS PYTHON PROJECT!! 2. Golf scores saved 30 points possible Reset to Starter Code Write a program, golf_scores.py, which reads names and

PL.EASE HELP WITH THIS PYTHON PROJECT!!

PL.EASE HELP WITH THIS PYTHON PROJECT!! 2. Golf scores saved 30 points

possible Reset to Starter Code Write a program, golf_scores.py, which reads names

2. Golf scores saved 30 points possible Reset to Starter Code Write a program, golf_scores.py, which reads names and scores of golfers from an input file and prints out information as shown below. A typical input file, scores.txt, looks like this: Tiger Woods 69 Dustin Johnson 71 Jon Rahm 68 Rory Mcllroy 67 Bryson DeChambeau 70 Webb Simpson 72 Tiger Woods 72 Rory Mcllroy 69 Bryson DeChambeau 72 Webb Simpson 68 Dustin Johnson 68 Jon Rahm 71 Bryson DeChambeau 69 Jon Rahm 70 Here it can be seen that the score of all rounds for a particular golfer is printed in a separate line. The field for the golfer's name is of width 20. The information is printed in the same order as the data appears in the input file (for example, Tiger Woods and Dustin Johnson appear first in the output because they appear first in the input file). Hint: It is suitable to store the scores (value) of each player in a list. If the input file cannot be opened, the program does not produce any output: Enter file name: bla.txt In addition to the functionality described above, the program should print out the name and the total score for the golfer who has the lowest total score IF the number of plavers >= 10. If two or more players have the lowest total score, the program prints out the name that appears first in the input file. An example output for this special case: Enter file name: scores_many_players.txt Player: Tiger Woods Scores: 69 72 67 Player: Dustin Johnson Scores: 71 68 Player: Jon Rahm Scores: 68 71 70 69 Player: Collin Morikawa Scores: 68 71 Player: Rory Mcllroy Scores: 67 69 Player: Bryson DeChambeau Scores: 70 72 69 Player: Justin Thomas Scores: 67 68 Player: Webb Simpson Scores: 72 68 71 Player: Brooks Koepka Scores: 69 66 Player: Xander Schaufelle Scores: 68 68 Player: Patrick Cantley Scores: 68 75 Justin Thomas has the lowest total score: 135 Note: The function that reads the input file can neither calculate nor print anything out

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!