Dice Sums

The following code determines the number of most probable sums, as well as the sums themselves of two fair dice.
The dice may have any real whole number of sides.