Question

Project 3 At a diving competition, the scores for one dive are determined by a panel...

Project 3

At a diving competition, the scores for one dive are determined by a panel of judges. The final score is calculated by:

* adding together all scores EXCEPT the highest and lowest scores

* that sum is then multiplied by 1.2

* that product is then multiplied by 0.6

You are to write a Python program which:

* allows the user to enter 6 scores provided by the judges

* the scores are to be placed in a list (you can create the list of scores, or append each score to an existing list)

*print out the scores you have stored in the list (make sure the [ ] is not printed)

* calculate the adjusted sum of the scores in the list (sum w/o max and min) print this sum. Hint: the list functions sum min and max will help here

* calculate the final score and print that score. Make sure that your final score is printed ONLY showing 3 decimal positions.

Be sure that your program is well-commented so that it is easily read. Also be sure that all user prompts are well-worded so that the user knows what is expected. Output values should be labeled so that it is clear what results are being printed.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

thanks for the question, here is the fully implemented code in python with detailed comments. Let me know in case you have any questions or doubts

===========================================================================================

# create an empty list that will store the judges score
judge_scores=[]

# within a for loop which executes 6 times we take in the score for 6 judges
for i in range(1,7):
    score = float(input('Enter judge{} score: '.format(i)))
  judge_scores.append(score)

# print the scores
print(', '.join([str(s) for s in judge_scores]))

# first find out the max score and min score from the list using max and min functions
max_score = max(judge_scores)
min_score = min(judge_scores)
# adjusted sum = total score - max score - min score
print('Adjusted Score: {0:.3f}'.format(sum(judge_scores)-max_score-min_score))

## calculate final score
final_score = sum(judge_scores) - max_score - min_score
final_score *=1.2 # multiply the sum first with 1.2
final_score*=0.6 # multiply the product again with 0.6

## print the final score with 3 decimal point
print('Final Score: {0:.3f}'.format(final_score))

Add a comment
Know the answer?
Add Answer to:
Project 3 At a diving competition, the scores for one dive are determined by a panel...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a short C++ program that prompts the user for a series of ten scores in...

    Write a short C++ program that prompts the user for a series of ten scores in the range of  0-10 and adds them into a total. Check to make sure the numbers that are entered are actually in the proper 0-10 range. If a 10 is entered then add the ten to the total then double the total to that point.   If a 5 is entered then add five to the total then divide the total by 2 (throwing away any remainders)...

  • Programming Lab 4 (Chapter 4) There is one checkpoint, make sure you call your professor to...

    Programming Lab 4 (Chapter 4) There is one checkpoint, make sure you call your professor to get checked. 4.1 Write a program that prompts the user for two integers and then prints The sum The difference The product The average The distance (absolute value of the difference) The maximum (the larger of the two) The minimum (the smaller of the two) Hint: The max, min, and absolute value methods are declared in the Math class. Lookup https://docs.oracle.com/javase/8/docs/api/java/lang/Math. html the API...

  • Write a C++ program named, gradeProcessor.cpp, that will do the following tasks: -Print welcome message -Generate...

    Write a C++ program named, gradeProcessor.cpp, that will do the following tasks: -Print welcome message -Generate the number of test scores the user enters; have scores fall into a normal distribution for grades -Display all of the generated scores - no more than 10 per line -Calculate and display the average of all scores -Find and display the number of scores above the overall average (previous output) -Find and display the letter grade that corresponds to the average above (overall...

  • java Part 1 Create a NetBeans project that asks for a file name. The file should...

    java Part 1 Create a NetBeans project that asks for a file name. The file should contain an unknown quantity of double numeric values with each number on its own line. There should be no empty lines. Open the file and read the numbers. Print the sum, average, and the count of the numbers. Be sure to label the outputs very clearly. Read the file values as Strings and use Double.parseDouble() to convert them. Part 2 Create a NetBeans project...

  • Exercise 7: Program exercise for Basic List operations Write a complete Python program including minimal comments...

    Exercise 7: Program exercise for Basic List operations Write a complete Python program including minimal comments (ile 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 1. Read scores from the user until the user enters nothing but Center > key 2. Store scores into a list for processing below 3. Find the average of the...

  • Piggy back on the programming project one you completed in module 3. You will use some...

    Piggy back on the programming project one you completed in module 3. You will use some of those concepts here again. We will be building this project inside out, start individual quiz and use a for loop to repeat it three times for three students. In this program you will be required to write a python program that generates math quizzes for students in second grade. Your program should do the following Ask the student for their name Provide 3...

  • Need code written for a java eclipse program that will follow the skeleton code. Exams and...

    Need code written for a java eclipse program that will follow the skeleton code. Exams and assignments are weighted You will design a Java grade calculator for this assignment. A user should be able to calculate her/his letter grade in COMS/MIS 207 by inputting their scores obtained on worksheets, assignments and exams into the program. A skeleton code named GradeCompute.java containing the main method and stubs for a few other methods, is provided to you. You must not modify/make changes...

  • Hi this is C++, I'm really struggle with it please help me.... ************************ Here is the...

    Hi this is C++, I'm really struggle with it please help me.... ************************ Here is the original high score program,: Write a program that records high-score data for a fictitious game. The program will ask the user to enter five names, and five scores. It will store the data in memory, and print it back out sorted by score. The output from your program should look exactly like this: Enter the name for score #1: Suzy Enter the score for...

  • Project 5 - intro to python Write a program in python that calculates the amount of...

    Project 5 - intro to python Write a program in python that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, four pennies the third day, and continues to double each day. Output the amount earned each day .. and the total pay at the end. The Algorithm (Plan) for your program would be: Ask the user for the...

  • IN C++ ADD COMMENTS AS MUCH AS POSSIBLE Exercise 1: Duplicate the Arrays Suppose you are...

    IN C++ ADD COMMENTS AS MUCH AS POSSIBLE Exercise 1: Duplicate the Arrays Suppose you are developing a program that works with arrays of integers, and you find that you frequently need to duplicate the arrays. Rather than rewriting the array-duplicating code each time you need it, you decide to write a function that accepts an array and its size as arguments. Creates a new array that is a copy of the argument array, and returns a pointer to the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT