Dodecahedral number | Function to calculate dodecahedral number ; Formula to calculate nth dodecahedral number ; Driver Code ; print result
def dodecahedral_num ( n ) : NEW_LINE INDENT return n * ( 3 * n - 1 ) * ( 3 * n - 2 ) // 2 NEW_LINE DEDENT n = 5 NEW_LINE print ( " % sth ▁ Dodecahedral ▁ number ▁ : " % n , dodecahedral_num ( n ) ) NEW_LINE