x=b*b-4*a*c if x<0: print('无实数解') else: x1=(-b+math.sqrt(x))/2/a x2=(-b-math.sqrt(x))/2/a return(x1,x2)
Sign in to make a reply
weaming