Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Race Results Your best friend has organized a 5K race. Minutes before the race started, the timing equipment broke, so he was forced to time

Race Results

Your best friend has organized a 5K race. Minutes before the race started, the timing equipment broke, so he was forced to time the race by with a stopwatch.

The stopwatch was started at the beginning of the race. As each runner finished your friend wrote down the time showing on the watch. Your job is to take this data and determine the 1st, 2nd, and 3rd winners of each category: Men, Women, Under 30, 40-60, and over 60.

Two files are provided. Racers.dat contains the bib number, name, age, and gender of each racer. Times.dat contains the bib number and times recorded at the finish line. Your output should look similar to this:

RACE RESULTS

Men:

2760 Eli Griffis 22:09

2042 Ken Grisback 22:30

776 Stephen Hinckley 22:45

Women:

2813 Keely McCarthy 23:55

2669 Jada Atchison 23:57

2719 Caroline Dee 27:50

Age under 30:

2504 Omar Rodriguez 23:56

2635 Leland Taylor 23:56

2669 Jada Atchison 23:57

Age 30 - 59:

2760 Eli Griffis 22:09

2042 Ken Grisback 22:30

776 Stephen Hinckley 22:45

Age 60 and over:

2995 Michael Doremus 31:32

2877 Dale Umholtz 39:36

2849 Maria Ramirez 41:51

Hint: As you read the times from the file convert them in MM:SS format, convert them to a single number - seconds since the start of the race. Convert them to MM:SS format as needed for printing.

LANGUAGE PYTHON

Racers.dat (couldn't upload it so I copied and pasted it)

Bib Athlete Name Age Gender 767 Mark Savino 32 M 768 William Roberts 30 M 769 Billy Duong 32 M 770 Patrick Fraley 38 M 771 Sophie Jones 37 F 773 David Conroy 25 M 774 David Giancola 36 M 775 Lindsey Gianco 36 F 776 Stephen Hinck 35 M 2001 Dina Abdeljab 22 F 2002 Lodia Acosta 26 F 2005 Kyle Alterman 22 M 2012 Louis Bartomeo 27 M 2018 Brian Bramswig 27 M 2028 Michael Colon 24 M 2034 Brendan Ferrit 46 M 2040 Rachel Gordon 24 F 2041 Rachel Gordon 24 F 2042 Ken Grisback 45 M 2043 Brian Henry 26 M 2046 Kevin Heron 25 M 2048 Alex Horvath 24 M 2059 Eric Levit 26 M 2063 Andrew Marr 25 M 2068 Anthony Molina 25 M 2072 Hunter Peters 26 M 2077 Josh Rank 27 M 2078 Andres Rivera 26 M 2079 Alex Rodriguez 29 M 2083 Jason Schmeltz 28 F

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

Determine the roles of spatial layout and functionality.

Answered: 1 week ago