代码错误不知道为什么
import math
def quadratic_equation(a, b, c):
x0=math.sqrt(b*b-a*c)
x1=(-b+x0)/(2*a)
x2=(-b-x0)/(2*a)
return x1,x2
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)
import math
def quadratic_equation(a, b, c):
x0=math.sqrt(b*b-a*c)
x1=(-b+x0)/(2*a)
x2=(-b-x0)/(2*a)
return x1,x2
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)
2016-03-03
举报