Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help coding this assignment Sample output under various conditions: Prompts for the score of six bowlers, re-prompts as necessary after invalid entries: Score

I need help coding this assignment

image text in transcribed

image text in transcribed

Sample output under various conditions: Prompts for the score of six bowlers, re-prompts as necessary after invalid entries: Score of Bowler 1: two hundred Error: Score must be numeric. Score of Bowler 1: 200 Score of Bowler 2: 500 Error: Score must be between @ and 380. Score of Bowler 2: 120 Score of Bowler 3: 250 Score of Bowler 4: 215 Score of Bowler 5: 185 Score of Bowler 6: 225 Resulting output, after console is cleared: Bowling Game Scores B1: 200 B2: 120 B3: 250 B4: 215 B5: 185 B6: 225 - Bowler B3 is the winner Bowler B2 has the lowest score Average score in this game is 199 points Enter 'y' to process another game or [enter] to exit: . Program Requirements Create a Python console application following the requirements below to allow the entry of six bowlers' scores for a bowling game. After that, the average, minimum and maximum scores are determined, and all results displayed. Detailed requirements: When the program starts, it will prompt for the score of Bowler 1. Bowlers' score must be numeric and cannot be fractions. For any entries that are not whole numbers, the program should display an appropriate error message and re-prompt for that bowler's score. Once a numeric score is entered, then the program should perform range validation to ensure the score is within the required range. Valid 10-pin bowling scores are whole numbers between 0 and 300. If the bowler enters a value outside of the acceptable range, the program should display an appropriate error message and re-prompt for that bowler's score. Once the entered score passes all validation, add this score to the list of scores, which will eventually hold all six bowlers' scores. The steps outlined above will have to repeat (loop structure required) to allow the entry of valid scores for six bowlers. Refer to the sample output on the next page to help guide you in your planning. Once six valid scores have been entered and added to the list of scores, you can then go ahead and process the list to determine the average of the six bowlers' scores rounded to the nearest whole number, as well as the bowler with the highest score and the bowler with lowest score. After processing, clear the console screen Using the entered scores, produce the formatted output matching the screenshots as close as possible. Display the six bowlers' scores as shown followed by the average score, winner, and loser. In case 2 or more bowlers have the same highest/lowest scores, only 1 will be displayed. Bonus marks opportunity. Prompt the if they would like to process another game. If they elect to enter another game, repeat the entire process again beginning with a prompt to enter a score for Bowler 1; otherwise end the application with no further notification. Warning: You are not allowed to use built-in functions that would solve the problem instantly, such as: sort(), min(), max(), sum(), mean(), median(), index() etc. You must determine min/max/average values by using loops, which is the main point of this assignment. Also, sorting is not a good idea in this case because would change the order of the elements

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions

Question

How are members held accountable for serving in the assigned roles?

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago