This Python program solves quadratic equations in the standard form ax^2 + bx + c = 0. It imports the complex math module, defines coefficients a, b, c, calculates the discriminant using the formula b^2 - 4ac, and finds the two solutions by applying the quadratic formula with the discriminant to get roots sol1 and sol2, which it prints.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
286 views
Python Program To Solve Quadratic Equation
This Python program solves quadratic equations in the standard form ax^2 + bx + c = 0. It imports the complex math module, defines coefficients a, b, c, calculates the discriminant using the formula b^2 - 4ac, and finds the two solutions by applying the quadratic formula with the discriminant to get roots sol1 and sol2, which it prints.