human
Write me a code to triangular Numbers and the other steps required given the following:
Triangular Numbers | Returns True if ' num ' is triangular , else False.
Base case.
A Triangular number must be sum of first n natural numbers.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to triangular Numbers and the other steps required.
 def isTriangular ( num ) :
	if ( num < 0 ) :
		return False
	sum , n = 0 , 1
	while ( sum <= num ) :
		sum = sum + n
		if ( sum == num ) :
			return True
		n += 1
	return False
n = 55
if ( isTriangular ( n ) ) :
	print ( " The ▁ number ▁ is ▁ a ▁ triangular ▁ number " )
else :
	print ( " The ▁ number ▁ is ▁ NOT ▁ a ▁ triangular ▁ number " )