Function to calculate the number of trees with exactly k leaves .
def k_Leaves ( n , k ) : NEW_LINE INDENT ans = ( ( binomialCoeff ( n , k ) * binomialCoeff ( n , k - 1 ) ) // n ) NEW_LINE print ( " Number ▁ of ▁ trees ▁ " , " having ▁ 4 ▁ edges ▁ and ▁ exactly ▁ 2 ▁ " , " leaves ▁ : ▁ " , ans ) NEW_LINE DEDENT