Function to calculate total number of Nodes of degree d in these trees .
def numberOfNodes ( n , d ) : NEW_LINE INDENT ans = binomialCoeff ( 2 * n - 1 - d , n - 1 ) NEW_LINE print ( " Number ▁ of ▁ Nodes ▁ " , " of ▁ degree ▁ 1 ▁ in ▁ a ▁ tree ▁ having ▁ 4 ▁ " , " edges ▁ : ▁ " , ans ) NEW_LINE DEDENT