Page 176 -
P. 176
data in files and arrays
Test Drive
Update your program in IDLE and run it. Look what happens:
The additional code ensures the
results are in the order you need.
Looks much better!
The program works great!
The scores are in descending order, and the program is really not much longer
than when it found just one score. Using arrays allows us to solve a much
harder problem with very little extra code. And instead of using lots of
complex logic and lots of variables, you have straightforward logic and only
one variable: the scores array.
Surf-A-Thon
Dude, those are
some sweet scores.
1. 9.12
2. 8.65
3. 8.45
you are here 4 141