Hexadecagonal number | Function to calculate hexadecagonal number ; Driver Code
def hexadecagonalNum ( n ) : NEW_LINE INDENT return ( ( 14 * n * n ) - 12 * n ) // 2 NEW_LINE DEDENT n = 5 NEW_LINE print ( " % sth ▁ Hexadecagonal ▁ number ▁ : ▁ " % n , hexadecagonalNum ( n ) ) NEW_LINE n = 9 NEW_LINE print ( " % sth ▁ Hexadecagonal ▁ number ▁ : ▁ " % n , hexadecagonalNum ( n ) ) NEW_LINE