求助,请问各位大神,我这个一元二次方程的代码哪里错了?
#-*-coding:utf-8-*-
import math
def quadratic_equation(a, b, c):
if b*b-4*a*c<0:
print '原方程无解'
elif b*b-4*a*c==0:
print 'x1=x2=', -1*b/2*a
else:
print 'x1=' , (-b+sqrt(b*b-4*a*c))/2*a, 'x2=',(-b+sqrt(b*b-4*a*c))/2*a
return
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, -6, 5)