为什么加了X,y就没有结果,代码如下
import math
def quadratic_equation(a, b, c,x,y):
t=math.sqrt(b*b-4*a*c)
x=(-b+t)/(2*a)
y=(-b-t)/(2*a)
return x,y
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)
import math
def quadratic_equation(a, b, c,x,y):
t=math.sqrt(b*b-4*a*c)
x=(-b+t)/(2*a)
y=(-b-t)/(2*a)
return x,y
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)
2017-03-26
举报