human
Straight | Function to check if N is a Straight Line number or not.
N must be > 99.
Difference between consecutive digits must be same.
Given Number N.
Function Call"
How can the above be solved in Python?
 Can you provide a code to straight and the other steps required?
assistant
#Here is code to straight and the other steps required.
 def isStraighLineNum ( N ) :
	if ( N <= 99 ) :
		return False ;
	str1 = str ( N ) ;
	d = int ( str1 [ 1 ] ) - int ( str1 [ 0 ] ) ;
	for i in range ( 2 , len ( str1 ) ) :
		if ( int ( str1 [ i ] ) - int ( str1 [ i - 1 ] ) != d ) :
			return False ;
	return True ;
N = 135 ;
if ( isStraighLineNum ( N ) ) :
	print ( " Yes " ) ;
else :
	print ( " No " ) ;