Preview:
a=int(input("enter a"))
b=int(input("enter b"))
c=int(input("enter c"))
if(a==0):
                print("quadratic does not exist")
else:
                d=b*b-4*a*c
                if(d>0):
                                x=(-b+sqrt(d))/2*a
                                y=(-b-sqrt(d))/2*a
                                print(x,y)
                elif(d==0):
                                    x=-b/(2*a)
                                    y=-b/(2*a)
                                    print(x,y)
                else:
                                    print("roots are imaginary")
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter