There is such a code:
print("Hello, user! This programm would find the roots of quadratic equation Ax^2 + Bx + C = 0") A = input() B = input() C = input() if (A.isdigit()) and (B.isdigit()) and (C.isdigit()): D = int(int(B)*int(B) - 4*int(A)*int(C)) import math if D > 0: x1 = float((-int(B) + math.sqrt(D))/(2*int(A))) x2 = float((-int(B) - math.sqrt(D))/(2*int(A))) print("Two roots: x1 = ", x1, ", x2 = ", x2) elif D == 0: x = float(-int(B)/(2*int(A))) print("One root: x = ", x) else: print("No roots.") else: print("Wrong input format.") In the case when we consider that ABC are integers, this code checks input ABCs for correctness. And how can you verify the correctness of the input data (suppose that the user does not enter the text) for real ABC?