Question: Write a Python program that analyses the time in seconds performed by a certain number of runners in some races. Your program must have 2

Write a Python program that analyses the time in seconds performed by a certain number of runners in some races. Your program must have 2 function; the main and another function. The main function reads data from an input file, which has the format shown below. Each line in the file starts with the runner name followed by 4 values representing the time performed by the runner in 4 races. For each runner, the other function receives a list containing the 4 times and returns another list containing the minimum time, the average time, TB12 and the maximum time performed by that runner. This information will be written in an output file as shown below. In addition to that, your main function will count how many runners got a race time less than 14 seconds. Note: You program must be general and works for any number of runners. All reading and writing must be done in the main function. Sample input file below: Bilal 12.414.217.413.8 Taimoor 14.213.711.812.3 Usman 11.816.410.215.9 Aslam 18.314.817.316.2 Ali 12.816.314.213.8 Rehan 13.515.213.514.7 Sample output file below: Name Min Time Max Time Avg Time Bilal 12.4017.4014.45 Taimoor 11.8014.2013.00 Usman 10.2016.4013.57 Aslam 14.8018.3016.65 Ali 12.8016.3014.27 Rehan 13.5015.2014.23 Number of runners who got race time less than 13 seconds =5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!