Function to calculate the number of trees in which the root has degree r .
def rootDegreeR ( n , r ) : NEW_LINE INDENT ans = r * binomialCoeff ( 2 * n - 1 - r , n - 1 ) NEW_LINE ans = ans // n NEW_LINE print ( " Number ▁ of ▁ trees ▁ " , " having ▁ 4 ▁ edges ▁ where ▁ root ▁ has ▁ " , " degree ▁ 2 ▁ : ▁ " , ans ) NEW_LINE DEDENT