我这代码一直提示缩进问题,崩溃了
import math
def quadratic_equation(a, b, c):
t = b*b - 4*a*c
if t >=0:
x1= (math.sqrt(t)+ b)/(-2*a)
x2= (math.sqrt(t)- b)/(2*a)
if x1 == x2:
return 'x1=x2=',x1
else:
return 'x1=',x1,'x2=',x2
else:
return 'quadratic wrong')
print quadratic_equation(2, 3, 6)
print quadratic_equation(1, -6, 5)