thonny program to calculate and print the roots of quadratic equation
Answers
Answered by
8
Answer:
# Python program to find roots of quadratic equation.
import math.
# function for finding roots.
def findRoots(a, b, c):
dis_form = b * b - 4 * a * c.
sqrt_val = math.sqrt(abs(dis_form))
if dis_form > 0:
print(" real and different roots ")
Answered by
0
Answer:
Here, "x" is unknown which you have to find and "a", "b", "c" specifies the numbers such that "a" is not equal to 0. If a = 0 then the equation becomes liner not quadratic anymore.
In the equation, a, b and c are called coefficients.
Let's take an example to solve the quadratic equation 8x2 + 16x + 8 = 0
Similar questions