y=b**2-4*a*c
if y<0:
print('无解')
else:
temp = math.sqrt(y)
x1 = (-b+temp)/2/a
x2 = (-b-temp)/2/a
return (x1, x2)
Sign in to make a reply
蜜蜂-Leo
y=b**2-4*a*c
if y<0:
print('无解')
else:
temp = math.sqrt(y)
x1 = (-b+temp)/2/a
x2 = (-b-temp)/2/a
return (x1, x2)