我不想返回None,该怎么办?
import math
def quadratic_equation(a, b, c):
h=b*b-4*a*c
if h>= 0:
return (-b-math.sqrt(h))/(2*a),(-b+math.sqrt(h))/(2*a)
else:
print '没有实数解'
print quadratic_equation(2, 3, 0)
print quadratic_equation(1, 0, 5)