Question: Exercise 7: Program exercise for Basic List operations Write a complete Python program including minimal comments (file name, your name, and problem description) that solves

Exercise 7: Program exercise for Basic List operations

Write a complete Python program including minimal comments (file name, your name, and problem description) that solves the following problem with the main function:

Problem Specification:

Write a program that reads a number of scores from the user and performs the following:

Read scores from the user until the user enters nothing but < enter > key

Store scores into a list for processing below

Find the average of the scores along with the number of scores read (format as shown).

Sort the scores in ascending order and

Reverses the scores so that the scores are highest to the lowest.

Print the score with the ranking starting with 1.

Make sure you have a main function and there should not be any global variable or statement other than the main function that is being called.

Sample RUN #1: enter a score: 95 enter a score: 65 enter a score: 77 enter a score: 67 enter a score: 88 enter a score: 98 enter a score: 84 enter a score: All scores stored: [95, 65, 77, 67, 88, 98, 84] There are 7 scores entered The average is 82.00 After sorting in ascending order: [65, 67, 77, 84, 88, 95, 98] rank: score 1 : 98 2 : 95 3 : 88 4 : 84 5 : 77 6 : 67 7 : 65 SAMPLE RUN #2: enter a score: 89 enter a score: 97 enter a score: 77 enter a score: All scores stored: [89, 97, 77] There are 3 scores entered The average is 87.67 After sorting in ascending order: [77, 89, 97] rank: score 1 : 97 2 : 89 3 : 77 SAMPLE RUN #3: enter a score: All scores stored: [] No scores entered 

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!