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 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 values representing the time performed by the runner in races. For each runner, the other function receives a list containing the times and returns another list containing the minimum time, the average time, TB 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 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 Taimoor Usman Aslam Ali Rehan Sample output file below: Name Min Time Max Time Avg Time Bilal Taimoor Usman Aslam Ali Rehan Number of runners who got race time less than seconds
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
