You are viewing a single comment's thread. Return to all comments →
Python 3
dice=[1,2,3,4,5,6] comb=[(a,b) for a in dice for b in dice] favourable=[(a+b)==6 for a,b in comb if a!=b] sum(favourable)/len(comb)
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Basic Probability Puzzles #2
You are viewing a single comment's thread. Return to all comments →
Python 3