History, History Of Technology, Software Engineering, Programming, Python.
- math.sqrt(D)) / (2*a) print(f"The solutions are {x1} and {x2}") elif D == 0: # Two equal real roots exist x = -b / (2*a) print(f"The solution is {x}") else: # Complex roots exist real_part = -b / (2*a) imaginary_part = math.sqrt(-D) / (2*a) print(f"The solutions are {real_part} +