You are on page 1of 1

a = int(input("Enter the coefficients of a:"))

b = int(input("Enter the coefficients of b:"))


c = int(input("Enter the coefficients of c:"))

d = b ** 2 - 4 * a * c #discriminant

if d > 0:
print("This equation has 2 solutions:")
elif d == 0:
print("This equation has 1 solution")
else:
print("This equation has no solution")

You might also like