Imagine you are writing a program and processes the raw data from a NASCAR (stock car) race from last weekend. The data is contained in a nested list, where each element is itself a list that contains the following: - A car number (as a string) - A driver's name (as a string) - List of lap names (as floats) Since many races are 200 or more laps, we have simplified the race data to only ten laps. Your job is to write a function named (find_loser) that takes the list of racers and determines the loser. The function should operate as follows: - Function is named find_loser - Function takes a single parameter, which is the list of data described above and demonstrated below. - The loser of the race is defined to be that race car/driver that has the highest overall cumulative race time for the 10 laps provided. - The function must return a tuple in the form of: (, , ). - The and must be string values. The must be a floating point value. If there is a tie of two or more losers with the same cumulative race times, the function should print an informative message and return an empty tuple (with no values). You can assume that car/driver element in the list contains a sublist with exactly 10 lap times that are floating point values. Do not assume a specific number of drivers/cars. Your function should work no matter how large the list of drivers/cars/times is.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

PYTHON!!!

Imagine you are writing a program and processes the raw data from a NASCAR (stock car) race from last weekend. The data is contained in a nested list, where each element is itself a list that contains the following:

- A car number (as a string)

- A driver's name (as a string)

- List of lap names (as floats)

Since many races are 200 or more laps, we have simplified the race data to only ten laps.

Your job is to write a function named (find_loser) that takes the list of racers and determines the loser. The function should operate as follows:

- Function is named find_loser

- Function takes a single parameter, which is the list of data described above and demonstrated below.

- The loser of the race is defined to be that race car/driver that has the highest overall cumulative race time for the 10 laps provided.

- The function must return a tuple in the form of: (<car number>, <driver name>, <cumulative race time>).

- The <car number> and <driver name> must be string values. The <cumulative race time> must be a floating point value.

If there is a tie of two or more losers with the same cumulative race times, the function should print an informative message and return an empty tuple (with no values).

You can assume that car/driver element in the list contains a sublist with exactly 10 lap times that are floating point values.

Do not assume a specific number of drivers/cars. Your function should work no matter how large the list of drivers/cars/times is.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY