报错最后一行
# -*- coding: utf-8 -*-
import math
def quadratic_equation(a, b, c):
if b*b-4*a*c>=0:
x=(-b+math.sqrt(b*b-4*a*c))/a/2
y=(-b-math.sqrt(b*b-4*a*c))/a/2
return x,y
else:
return u'不存在'
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)
print quadratic_equation(10, -6, 5)