这段代码为什么总是报语法错误?
import math
def quadratic_equation(a, b, c):
q = b * b - 4 * a * c
if q > 0:
x1 = (-b + math.sqrt(q)) / (2 * a)
x2 = (-b - math.sqrt(q)) / (2 * a)
return x1,x2
elif q = 0:
x1 = x2 = (-b) / (2 * a)
return x1,x2
else q < 0:
return '方程无实根'
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)