Hendecagonal number | Function of Hendecagonal number ; Formula to calculate nth Hendecagonal number & return it into main function . ; Driver Code
def hendecagonal_num ( n ) : NEW_LINE INDENT return ( 9 * n * n - 7 * n ) // 2 NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT n = 3 NEW_LINE print ( n , " rd ▁ Hendecagonal ▁ number ▁ : ▁ " , hendecagonal_num ( n ) ) NEW_LINE n = 10 NEW_LINE print ( n , " th ▁ Hendecagonal ▁ number ▁ : ▁ " , hendecagonal_num ( n ) ) NEW_LINE DEDENT