Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me solve this using Python language: Please include comments and explanation as much as you can. Learning Outcomes: Get input from a user,

Please help me solve this using Python language: Please include comments and explanation as much as you can.

Learning Outcomes:

Get input from a user, parse it, and store it in a List

Do computations on stored data to derive data

Sort data in a list using different fields of data

Use loops, decision logic

Format and output data on the console and in a text file

Problem:

Knowing that you are a budding programmer, your friends have asked you to create a scoring program for your Saturday bowling league. They want the program to work as follows:

At the end of each game, the program asks you to record the scores for each team member. You type in their first name and that person's score for the game on a single line.

When there are no more players to input, enter an empty line.

Your program should now print the following lists in columns:

the names and scores of each bowler in the order entered

the names and scores in descending order with high scorer at the top

the names and scores in alphabetical order

If anyone scores a perfect game, put an asterisk in front of their name.

Next, your program should display the following summary information:

Display a congratulatory message showing the high score and who got it.

Display a sympathetic message showing the low score and who got it.

The team average score, rounded down to the nearest pin.

Last, your program should write each of the lists and the summary information to a text file called game_results.txt in the same format it is displayed on the screen.

Your program should work with the following input:

Sam 200 Bill 125 Mary 235 Jane 205 Alex 300 Sue 280

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books