Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Four swimmers are selected to be part of the team for a 4x100 medley relay race. In this race, one swimmer will swim freestyle, one
Four swimmers are selected to be part of the team for a 4x100 medley relay race. In this race, one swimmer will swim freestyle, one breaststroke, one butterfly, and one backstroke. The times that each swimmer can do in each style are summarized in this table: Time (seconds) Breast Fly Swimmer Free Back 54 54 53 Gary Hall Mark Spitz Jim Montgomery Chet Jastremski 51 50 56 57 53 54 51 52 54 55 52 56 53 Program a dictionary in Python that stores the information on the table. You should use the name of the swimmer as the key. You may use shorter name if you want, but it should be a string. The value associated with each key should be a list with the four times, in the order shown on the table. Make a program that tries all possible assignments of swimmers to styles. For each assignment, compute and print the total time of the race. Note that there are 24 different permutations possible. Find the assignment that results in the least total time. This should be done automatically by your program
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started