diff --git a/Lesson_1/task4.py b/Lesson_1/task4.py index 1bad800..3180016 100644 --- a/Lesson_1/task4.py +++ b/Lesson_1/task4.py @@ -17,6 +17,10 @@ except ValueError: print("Invalid numbers entered.") sys.exit(1) +if not math.isfinite(a) or not math.isfinite(b) or not math.isfinite(c): + print("Invalid numbers entered.") + sys.exit(1) + if a == 0: print("Not a quadratic equation.") sys.exit(2)