"Kent Johnson" <[EMAIL PROTECTED]> wrote
It's not too bad but I would probably use a dictionary rather
than the list - which avoids the index problem
Not sure how the dict is better - in either case, leaving off the
grade corresponding to a score of 100 will raise an exception.
Sure, you could just extend the list to have 11 elements
but its less obvious than with the dictionary which for this purpose
provides a self documenting mapping between the score and
the grade. IMHO of course :-)
Alan G.
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor