Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#########URGENT #################NEED IT IN AN HOUR THANKS FOR HELP IN ADVANCE! Triathlons require completion of 3 events: running, biking & swimming. Assume that the fastest

#########URGENT #################NEED IT IN AN HOUR

THANKS FOR HELP IN ADVANCE!

Triathlons require completion of 3 events: running, biking & swimming. Assume that the fastest total time for the 3 events determines the overall winner.

Write a python program to determine the overall winner and average event times:

Using a loop, prompt the user to enter 4 competitor's names with their event times. (Use data below.)

Create and use the following 2 functions:

Calculate the Average time for an event. Return the average of the 4 times for each event.

Determine the winner based on Fastest total time among all competitors.

The program must prompt the user for event times, then use the functions to determine average time for each event and fastest time among the 4 racers. Output each competitors name, their 3 event times, the average time for each event and the overall winner (fastest). Hint: convert time to seconds to do comparisons.

Note: Input times are in HH:MM:SS and display the results of average time for the event and fastest total time in HH:MM:SS format.

Data for the program:

Name ----- Running-----Biking----Swimming

Jiji ------0:59:03----1:53:10----0:33:22

Nini-----0:38:55----1:26:11-----0:31:25

Mai-----0:45:44----1:23:04----0:35:06

TJ -------0:35:33---1:34:12----0:30:19

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions

Question

What is an operating segment?

Answered: 1 week ago

Question

Perform an Internet search. Discuss a company that uses EPLI.

Answered: 1 week ago