## This one was a little bit tough for me to get my head around again, essentially you have to follow the leaf-tree diagram and multiply the probabilities of each outcome. I struggled
## most with understanding that you needed to take into account the fact that you are removing individuals from the population, and you have to take into account population size. 
## Have to create a table of probabilities, and multiply them by the probabilities
## from the punnet squares. Then simplify the equation 

## k = 2
## m = 2
## n = 2
# k + m + n = 6

## prob of k/k is k/pop x k/pop-1 or 2/6 x 1/5 = 0.06 and then that x1 for the punnet square


k = 22                                                      
m = 29                                                      
n = 20                                                       
pop = k + m + n                                               
prob = (4*(k*(k-1)+2*k*m+2*k*n+m*n)+3*m*(m-1))/(4*pop*(pop-1))
print(prob)                                                   
