Lab 4: Bowling Scores (Arrays) Lab Assignment for PROG1205 – Intro to Programming Page 1 of 3 Prior to attempting this problem, you should have done the following: 1. Read the assigned textbook...
1 answer below »Lab 4: Bowling Scores (A
ays)
Lab Assignment for PROG1205 – Intro to Programming
Page 1 of 3
Prior to attempting this problem, you should have done the following:
1. Read the assigned textbook readings for weeks 5 through 8.
2. Viewed the A
ays: Lists and Tuples video series from week 8 and completed the associated Pre-Class
Activity.
General Requirements
1. This lab assignment is to be completed individually. Group submissions will not be considered.
2. Analyze the problem, design a documented plan (i.e. flowchart or pseudo-code), code and test a solution
following the step-by-step approach presented in this course.
3. Submit your solution and plan to the appropriate assignment folder on DC Connect by the due date
provided.
4. Your instructor will assign a grade and post feedback on your submission to DC Connect.
Program Requirements
Create a simple Python application following the requirements below to allow entry of six game scores for a
owler so that an average score can be calculated, minimum and maximum scores determined, with all results
displayed.
Detailed requirements:
When the program starts the bowler is prompted for a score for ‘Game 1’.
Accept the bowling score from the user; valid bowling scores are whole numbers between 0 and 300.
Once a valid numeric score is entered then perform range validation to ensure it is within the required
entry range. If the bowler enters a value outside of the acceptable range, or for any entries that aren’t
whole numbers, the program should display an appropriate e
or message and re-prompt for that
game’s score.
Once the entered score passes all validation, store the score in a list, which will eventually hold all six
scores that are entered.
The steps outlined above will all have to repeat (iterative structure required) to allow the entry of valid
scores for six games. Refer to the sample output on the next page to help guide you in your planning.
Once six game valid scores have been entered and stored in your list, you can then go ahead and
process the list to determine the average of the six player scores rounded to the nearest whole number,
as well as the high score and low score for the player.
Using the entered scores, produce output to match the screenshots supplied.
Display the original scores as shown followed by the player average, high score, and low score.
Display a prompt to the user asking if they would like to process another bowler’s scores for average
calculation and high/low determination. If the user elects to enter another bowler’s scores, repeat the
entire process again beginning with a prompt to enter a score for Game 1; otherwise end the application
with no further notification.
Lab 4: Bowling Scores (A
ays)
Lab Assignment for PROG1205 – Intro to Programming
Page 2 of 3
Sample output under various conditions:
Prompts for six game scores, re-prompts as necessary after bad entries:
Resulting output, and the user elects to enter another set of scores:
Second run:
Resulting output from the second run, user improperly responds to prompt to exit or continue:
Lab 4: Bowling Scores (A
ays)
Lab Assignment for PROG1205 – Intro to Programming
Page 3 of 3
Style Guide:
To be eligible for full marks on this or any lab in this course your application must conform to the requirements
as outlined above as well as our prescribed style guide, in this case making sure to observe the PEP8 naming
conventions for Python as well as appropriate and complete program documentation.
Development Hints:
All scores entered will be whole numbers and, of course, the average should be calculated before it is
ounded.
You will have to also consider the prompt message that appears after a bad score entry, i.e. if the bowler
enters a non-numeric or invalid value for ‘Game 1’ they should be re-prompted for a score for ‘Game 1’