Page 223 -
P. 223
custom data objects
Test Drive
Let’s confirm that all of the re-factoring suggestions from the Head First Code Review Team are
working as expected. Load your code into IDLE and take it for a spin.
All of the data processing is
moved into the function.
This code has been considerably tidied up and
now displays the name of the athlete associated
with their times.
Looking
good!
To process additional athletes, all you need is two lines of code: the first invokes
the get_coach_data() function and the second invokes print().
And if you require additional functionality, it’s no big deal to write more
functions to provide the required functionality, is it?
you are here 4 187