那个大神帮忙看下为啥这个不对呀
import math
def quadratic_equation(a, b, c):
t =math.sqrt(b*b - 4*a*c)/(4*a*a)
return t - b/(2*a) , b/(2*a) - t
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)
import math
def quadratic_equation(a, b, c):
t =math.sqrt(b*b - 4*a*c)/(4*a*a)
return t - b/(2*a) , b/(2*a) - t
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)
2018-11-19
举报