Program to check if N is a Enneadecagonal Number | Python3 program for the above approach ; Function to check if number N is a enneadecagonal number ; Condition to check if N is a enneadecagonal number ; Given Number ; Function call
import math NEW_LINE def isenneadecagonal ( N ) : NEW_LINE INDENT n = ( 15 + math . sqrt ( 136 * N + 225 ) ) / 34 NEW_LINE return ( n - int ( n ) ) == 0 NEW_LINE DEDENT N = 19 NEW_LINE if ( isenneadecagonal ( N ) ) : NEW_LINE INDENT print ( " Yes " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " No " ) NEW_LINE DEDENT