def main(): print("This program solves the quadratic equation. \ In case there are no real number solutions it prints out a warning") try: import math a = float(input("Enter coefficient a:")) b = float(input("Enter coefficient b:")) c = float(input("Enter coefficient c:")) discrRoot = math.sqrt(b*b-4*a*c) root1=(-b+discrRoot)/(2*a) root2=(-b-discrRoot)/(2*a) print("The roots of the quadratic equation ", a,"x^2 + ",b,"x + ",c," are: ", root1,", ",root2) except ValueError: print("No real roots") main()