Premium problem47. Distribution of a Two-Dice Sum

Easy Locked

Return the full probability mass function of the sum of two fair six-sided dice, as a dict mapping each possible sum to its probability.

  • the keys run from 2 to 12
  • there are 36 equally likely ordered outcomes
  • the values must sum to 1

Output

{2: 0.027777777777777776, 3: 0.05555555555555555, 4: 0.08333333333333333, 5: 0.1111111111111111, 6: 0.1388888888888889, 7: 0.16666666666666666, 8: 0.1388888888888889, 9: 0.1111111111111111, 10: 0.08333333333333333, 11: 0.05555555555555555, 12: 0.027777777777777776}

Premium problem

This one's part of Premium. Unlock the full Probability track plus every other premium problem on the site.

Implement solve(...)