human
Minimum and maximum possible length of the third side of a triangle | Function to find the minimum and the maximum possible length of the third side of the given triangle.
Not a valid triangle.
Not a valid triangle.
Driver code"
Solution in Python:
 Can you provide a code to minimum and maximum possible length of the third side of a triangle and the other steps required?
assistant
#Here is code to minimum and maximum possible length of the third side of a triangle and the other steps required.
 def find_length ( s1 , s2 ) :
	if ( s1 <= 0 or s2 <= 0 ) :
		print ( - 1 , end = " " ) ;
		return ;
	max_length = s1 + s2 - 1 ;
	min_length = max ( s1 , s2 ) - min ( s1 , s2 ) + 1 ;
	if ( min_length > max_length ) :
		print ( - 1 , end = " " ) ;
		return ;
	print ( " Max ▁ = " , max_length ) ;
	print ( " Min ▁ = " , min_length ) ;
if __name__ == " _ _ main _ _ " :
	s1 = 8 ;
	s2 = 5 ;
	find_length ( s1 , s2 ) ;