Quadratic equation
a
b
c
import cmath
a = float(a)
b = float(b)
c = float(c)
d = (b**2) - (4*a*c)
sol1 = (-b-cmath.sqrt(d))/(2*a)
sol2 = (-b+cmath.sqrt(d))/(2*a)
print('The solutions are {0:.2f} and {1:.2f}'.format(sol1,sol2))
The solutions are -1.00-1.41j and -1.00+1.41j