我的为啥返回这个 (-0.25, -1.75) (5.0, 1.0)
import math
def quadratic_equation(a, b, c):
x=pow(b,2)-4*a*c
if x>=0:
x1=-b/(2*a)+math.sqrt(x)/(2*a)
x2=-b/(2*a)-math.sqrt(x)/(2*a)
return x1,x2
else:
return
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)
我的为啥返回这个
(-0.25, -1.75)
(5.0, 1.0)