OneCompiler

quadratic eq solver

144

import cmath

a = 1
b = 5
c = 6

d = (b**2) - (4ac)

sol1 = (-b-cmath.sqrt(d))/(2a)
sol2 = (-b+cmath.sqrt(d))/(2
a)

print('the solution are {0} and {1}'.format(sol1,sol2))