A Best Ball ScoreCIS 142Name_______________________________ Overview In a best ball game in golf, two or more players team up. The team’s score per hole is assigned the lowest team member’s score....

In Python


A Best Ball ScoreCIS 142Name_______________________________ Overview In a best ball game in golf, two or more players team up. The team’s score per hole is assigned the lowest team member’s score. In this program, you will compute this score and practice using lists and functions in the process. Preliminary · Download GolfScoresStudent.py from Canvas and open this file in Wing. · You will notice that it already contains several function headers and comments describing what you are to do. Requirements · Follow all coding guidelines and remember to ensure that each statement does not exceed 80 characters on a single line (If it does, you could use \ to split onto additional lines.). You do not need to add any additional comments. · Complete fillGolfScores according to the header comments. Utilize the named “constants” provided rather than hard-coding in a numeric literal such as 2, 6, or 18. · Complete displayScores according to the header comments. This function should work for a list of any size. In other words, don’t depend upon the length of the list being 18. · Complete bestBallScore according to the header comments. This function should work for a list of any size. In other words, don’t depend upon the length of the list being 18. · When calculating the best ball score, loop through the lists and add the lowest score at each position. Example:player1Scores 4 5 4 6 .... player2Scores 3 4 5 6 .... on hole one, the 3 is lowest, so add that on hole two, the 4 is lowest, so add that on hole three, the 4 is lowest, so add that on hole 4, there is a tie, so add either one. bestBallScore = 3 + 4 + 4 + 6 + .... · Complete main by following the comments. · Your code should work for a list of a different size by only changing the value of MAX_SCORES in fillGolfScores Test Run (Correct code will produce the same output, but your numbers will likely differ) Player 1: 4 4 5 2 3 6 6 3 5 5 2 3 3 2 5 4 5 2 Player 2: 4 5 3 6 5 2 4 5 4 2 5 4 4 6 3 5 4 6 Best ball score: 54 Submission (points deducted if not followed) · Upload GolfScoresStudent.py.
Oct 29, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here