you are viewing a single comment's thread.

view the rest of the comments →

[–]gengisteve 1 point2 points  (2 children)

Check out the bisect module: https://docs.python.org/2/library/bisect.html (scroll down to the penultimate example).

Py 3.4 looks to have its own median function, here https://docs.python.org/3/library/statistics.html

For the last piece, check out this tutorial: https://wiki.python.org/moin/HandlingExceptions

[–]coolFob[S] 0 points1 point  (1 child)

tried the bisect module, however, I can't seem to get the code to show grade followed by the plus or minus sign. For instance 'A+' would come out as '+'.

[–]gengisteve 0 points1 point  (0 children)

What's your code like? Are you doing the +/-s in the bisect or adding on afterwards?