1# Solve the quadratic equation ax**2 + bx + c = 0
2
3# import complex math module
4import cmath
5
6a = 1
7b = 5
8c = 6
9
10# calculate the discriminant
11d = (b**2) - (4*a*c)
12
13# find two solutions
14sol1 = (-b-cmath.sqrt(d))/(2*a)
15sol2 = (-b+cmath.sqrt(d))/(2*a)
16
17print('The solution are {0} and {1}'.format(sol1,sol2))