human
What is a code to maximum and Minimum value of a quadratic function and the other steps required given the following:
Maximum and Minimum value of a quadratic function | Function to print the Maximum and Minimum values of the quadratic function.
Calculate the value of second part.
Print the values.
Open upward parabola function.
Open downward parabola function.
If a = 0 then it is not a quadratic function.
Driver code"
How can the above be solved in Python?
assistant
#Here is code to maximum and Minimum value of a quadratic function and the other steps required.
 def PrintMaxMinValue ( a , b , c ) :
	secondPart = c * 1.0 - ( b * b / ( 4.0 * a ) ) ;
	if ( a > 0 ) :
		print ( " Maxvalue ▁ = " , " Infinity " ) ;
		print ( " Minvalue ▁ = ▁ " , secondPart ) ;
	elif ( a < 0 ) :
		print ( " Maxvalue ▁ = ▁ " , secondPart ) ;
		print ( " Minvalue ▁ = " , " - Infinity " ) ;
	else :
		print ( " Not ▁ a ▁ quadratic ▁ function " ) ;
if __name__ == " _ _ main _ _ " :
	a = - 1 ; b = 3 ; c = - 2 ;
	PrintMaxMinValue ( a , b , c ) ;