hw03: Marathon chip timing
- Due before the beginning of class on Friday, January 13
The data
Some of the world’s most famous historical figures (as calculated by Wikipedia page views) have run a chip-timed marathon race. The course was out-and-back, so each runner went over the timing mat twice, once at the beginning when they started and again at the end when they finished.
times.csv is a file containing marathon chip times. (Follow that link to have a look at the file, and there is a link at the top of that page which will allow you to download it.)
Each name appears twice in this file for the two times they crossed the mat; their marathon time will be the difference between these two time values.
Your task
Write a program marathon.py
which reads in the data from a file called
times.csv
and prints out the name of the marathon winner, i.e., the
person who had the shortest time from start to finish.
In the sample times.csv file provided, the winner is ChristianBale with an impressive time of 02:09:00. Here’s how it should look if you run it:
We may also test your code with different input files, but they will always be called `times.csv` (so you can just hard-code that filename into your program).roche@ubuntu$
python3 marathon.py
ChristianBale
Submit command
To submit files for this homework, run one of these commands:
submit -c=sd212 -p=hw03 marathon.py
club -csd212 -phw03 marathon.py