Form the Cubic equation from the given roots | Function to find the cubic equation whose roots are a , b and c ; Find the value of coefficient ; Print the equation as per the above coefficients ; Driver Code ; Function Call
def findEquation ( a , b , c ) : NEW_LINE INDENT X = ( a + b + c ) ; NEW_LINE Y = ( a * b ) + ( b * c ) + ( c * a ) ; NEW_LINE Z = ( a * b * c ) ; NEW_LINE print ( " x ^ 3 ▁ - ▁ " , X , " x ^ 2 ▁ + ▁ " , Y , " x ▁ - ▁ " , Z , " ▁ = ▁ 0" ) ; NEW_LINE DEDENT if __name__ == ' _ _ main _ _ ' : NEW_LINE INDENT a = 5 ; NEW_LINE b = 2 ; NEW_LINE c = 3 ; NEW_LINE findEquation ( a , b , c ) ; NEW_LINE DEDENT