A school is hosting a running event among the members of the track and field team...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A school is hosting a running event among the members of the track and field team to decide on a representative to send to a regional tournament. Today, the last 4 finalists will compete in three races to determine the representative. The races are 100m Sprint, 400m Sprint and 150m Hurdles. The 4 finalists will be referred as Runner1, Runner2, Runner3 and Runner4 1. (10 pts) Write a code asking the user to enter the various times of each runner for each race. You should save the user input in a single dictionary named record Dict, so that each key-value pair correspond to the result of a given race. Hint: You should keep the runner time in the same order for each race. This way the first value entered corresponds to Runner1 time, the second value corresponds to Runner2 and so on. The following is an example of the code output. User input is in bold. Enter the 100m Sprint time for Runner1: 10.5 Enter the 100m Sprint time for Runner2: 10.8 Enter the 100m Sprint time for Runner3: 9.8 Enter the 100m Sprint time for Runner4: 11.2 Enter the 400m Sprint time for Runner1: 46.3 Enter the 400m Sprint time for Runner2: 45.7 Enter the 400m Sprint time for Runner3: 47.1 Enter the 400m Sprint time for Runner4: 46.8 Enter the 150m Hurdles time for Runner1: 15.3 Enter the 150m Hurdles time for Runner2: 14.9 Enter the 150m Hurdles time for Runner3: 15.2 Enter the 150m Hurdles time for Runner4: 14.3 Write a code that will use the two functions BestTime and Second Best to attribute points to each runner and use the function Highest Points to determine which runner should be the representative. Your code should use a list of integers, RunnerPoints to represent the total points of each runner. Here is a possible order of operations: 1.Call Best Time to obtain the lowest 100m Sprint time and which runner did this time. 2. Add 5 points to this runner in RunnerPoints list. 3. Call SecondBest to obtain the second best lowest 100m Sprint time and which runner did this time. 4. Add 3 points to this runner in RunnerPoints list. 5. Repeat the steps above for the 400m Sprint and 150m Hurdles. 6. Once all points are recorded, call HighestPoints to obtain which runner has the total highest point. 7. Display which runner is the representative Based on the previous user entry, the total points are Runner1: 6; Runner2: 8; Runner3: 5; Runner4 : 5 The representative is therefore runner 2 A school is hosting a running event among the members of the track and field team to decide on a representative to send to a regional tournament. Today, the last 4 finalists will compete in three races to determine the representative. The races are 100m Sprint, 400m Sprint and 150m Hurdles. The 4 finalists will be referred as Runner1, Runner2, Runner3 and Runner4 1. (10 pts) Write a code asking the user to enter the various times of each runner for each race. You should save the user input in a single dictionary named record Dict, so that each key-value pair correspond to the result of a given race. Hint: You should keep the runner time in the same order for each race. This way the first value entered corresponds to Runner1 time, the second value corresponds to Runner2 and so on. The following is an example of the code output. User input is in bold. Enter the 100m Sprint time for Runner1: 10.5 Enter the 100m Sprint time for Runner2: 10.8 Enter the 100m Sprint time for Runner3: 9.8 Enter the 100m Sprint time for Runner4: 11.2 Enter the 400m Sprint time for Runner1: 46.3 Enter the 400m Sprint time for Runner2: 45.7 Enter the 400m Sprint time for Runner3: 47.1 Enter the 400m Sprint time for Runner4: 46.8 Enter the 150m Hurdles time for Runner1: 15.3 Enter the 150m Hurdles time for Runner2: 14.9 Enter the 150m Hurdles time for Runner3: 15.2 Enter the 150m Hurdles time for Runner4: 14.3 Write a code that will use the two functions BestTime and Second Best to attribute points to each runner and use the function Highest Points to determine which runner should be the representative. Your code should use a list of integers, RunnerPoints to represent the total points of each runner. Here is a possible order of operations: 1.Call Best Time to obtain the lowest 100m Sprint time and which runner did this time. 2. Add 5 points to this runner in RunnerPoints list. 3. Call SecondBest to obtain the second best lowest 100m Sprint time and which runner did this time. 4. Add 3 points to this runner in RunnerPoints list. 5. Repeat the steps above for the 400m Sprint and 150m Hurdles. 6. Once all points are recorded, call HighestPoints to obtain which runner has the total highest point. 7. Display which runner is the representative Based on the previous user entry, the total points are Runner1: 6; Runner2: 8; Runner3: 5; Runner4 : 5 The representative is therefore runner 2
Expert Answer:
Answer rating: 100% (QA)
Solution Heres a Python code that asks the user to enter the times for each runner in ea... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
24) Why do organizations use budgeted rates instead of actual rates to allocate the costs of support departments to each other and to user departments and divisions? Explain. 14.4 Evaluate and select...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Case Swimmers Headphones1 Finally! Its the end of 2019 and you are sitting at your new desk in a plush office in north Bogota, with a delicious cup of Colombian coffee. You think about all it took to...
-
Sunland Company has the below information for accruals for the year ended December 31st, 2022. the company adjusts its accounts annually. Chapter 4 Homework e Question 6 of 7 Current Attempt in...
-
Find the current flowing through the resistance R1 of the circuit shown in Fig. 3.48 if the resistances are equal to R1 = 10, R2 = 20 , and R3 = 30 , and the potentials of points 1, 2, and 3 are...
-
Discuss at least two ways in which the legal system of apartheid in South Africa continues to have a residual effect on the people, although the laws have been lifted.Compare and contrast the...
-
Describe whys the medical record is important in legal proceedings.
-
The SEC Form 10-K of Google is reproduced online at www.wiley.com/college/pratt. REQUIRED: Review the 10-K, and answer the following questions: a. What are the major sources of cash for the company...
-
at the beginning of the year addisons companys assests are 1 5 8 0 0 0 and its equity is 1 1 8 5 0 0 . during the year assets increase 8 0 0 0 0 and liabilities increase 4 8 0 0 0 . what is the...
-
Estimate the volume change of vaporization for ammonia at 20(C. At this temperature the vapor pressure of ammonia is 857 kPa.
-
Explain variance, standard deviation and beta. What do these terms describe about data? Show the calculations of variance and standard deviation using one variable such as an grades OR minutes of...
-
Log on to http://supreme.lp.findlaw.com/supreme_court. Examine the pending cases on the Supreme Courts docket. Do any of these cases involve constitutional limitations on criminal law? How would you...
-
A company has 25 million in equity, 18 million in preference shares, 15 million in secured bonds, and 34 million in unsecured bonds. Assume, because of financial distress, that the managers have...
-
A credit card company accepts 70%of all applicants for credit cards. A random sample of 100 applications is taken. (a) What is the probability that the sample proportion of acceptance is between .60...
-
1 Linfrae plc is a computer software development firm and is considering a hostile takeover of Jaffikake plc, a software distribution firm. Linfrae has been advised by its investment bankers that a...
-
Using the FAIR test, evaluate a Wall Street Journal interview with Tim Cook (Tim Cook Defends Apples Encryption Policy) on YouTube (https://www.youtube.com/watch?v=BZmeZyDGkQ0) about resistance to a...
-
Example 8: A cast iron pulley transmits 10 kW at 400 r.p.m. The diameter of the pulley is 1.2 meter and it has four straight arms of elliptical cross-section, in which the major axis is twice the...
-
The company manufactures three products: wooden chairs, tables and dressers. AFC started off as a 'Mom & Pop' shop but has grown rapidly. AFC uses one assembly line to build all three products,...
-
Why are international affiliations becoming more important to Canadian unions?
-
What difficulties do unions face in organizing workers in service occupations?
-
A small group of clerical workers who are employed in the administrative office of a large manufacturing plant want to form a union. Identify and discuss the considerations that would be raised in...
-
Test for consistency of least squares in the ARDL representation of an infinite distributed lag model.
-
The "fun size" of a Snickers bar is supposed to weigh 20 grams. Because the penalty for selling candy bars under their advertised weight is severe, the manufacturer calibrates the machine so the mean...
-
(a) Determine the critical value(s) for a right-tailed test of a population mean at the \(\alpha=0.01\) level of significance with 15 degrees of freedom. (b) Determine the critical value(s) for a...
Study smarter with the SolutionInn App