Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program for each of the problems in this lab. Please use PyCharm to type and test your programs. Submit the Python files

Write a Python program for each of the problems in this lab. Please use PyCharm to type and test your programs. Submit the Python files to Blackboard for credit. In this lab, you should submit 4 Python files, one for each problem.

Problem 3

Three figure skaters, Jean, Kayla and Connie, compete in a meet. Each skater receives 4 scores. Write a program to do the following.

(A) Ask the user to enter 4 scores for Jean. Store the scores in a list. Display the list.

(B) Ask the user to enter 4 scores for Kayla. Store the scores in a list. Display the list.

(C) Ask the user to enter 4 scores for Connie. Store the scores in a list. Display the list.

(D) Create a list to store the three score lists. This is a list of lists that contains three elements: Jeans score list, Kaylas score list, Connies score list. Display this list of lists.

(E) Use a set of nested for loops to add 1 extra point to every score of every skater in the list of lists created in part (d).

(F) Display the modified list of lists. Each score should be 1 point higher than before.

(G) For each skater in the list of lists, sort her 4 scores in ascending order.

(H) Display the modified list of lists. Each skaters 4 scores should be in ascending order.

The following is an example.

Please enter Jean's scores one by one.

Enter a score: 77

Enter a score: 74

Enter a score: 75

Enter a score: 72

Jean's scores: [77.0, 74.0, 75.0, 72.0]

Please enter Kayla's scores one by one.

Enter a score: 81

Enter a score: 77

Enter a score: 80

Enter a score: 79

Kayla's scores: [81.0, 77.0, 80.0, 79.0]

Please enter Connie's scores one by one.

Enter a score: 69

Enter a score: 74

Enter a score: 72

Enter a score: 70

Connie's scores: [69.0, 74.0, 72.0, 70.0]

All scores: [[77.0, 74.0, 75.0, 72.0], [81.0, 77.0, 80.0, 79.0], [69.0, 74.0, 72.0, 70.0]]

All scores after extra point: [[78.0, 75.0, 76.0, 73.0], [82.0, 78.0, 81.0, 80.0], [70.0, 75.0, 73.0, 71.0]]

All scores after sorting: [[73.0, 75.0, 76.0, 78.0], [78.0, 80.0, 81.0, 82.0], [70.0, 71.0, 73.0, 75.0]]

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

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

Explain the different types of Mergers.

Answered: 1 week ago

Question

What is dividend payout ratio ?

Answered: 1 week ago