Question: Question 3: import math def quad(): a, b, c = [float(s) for sin input (Enter coefficient a, b, c: ).split(',')] discRoot = math.sqrt(b* b -

 Question 3: import math def quad(): a, b, c = [float(s)

Question 3: import math def quad(): a, b, c = [float(s) for sin input ("Enter coefficient a, b, c: ").split(',')] discRoot = math.sqrt(b* b - 4* a * c) rootl = (-b + discRoot) / (2 * a) root2 = (-b - discRoot) / (2 * a) print(" The solutions are:", rootl, root2) quad() a) Choose the specific case of the following input a, b, c: * ValueError: math domain error (No real root) * rootl and root2 * "Invalid coefficient given *Something went wrong! * double root 2, 5, 1 0, 5, 1 > 1, 1, 1 1, 2,1 >b, 5, m b) Add instructions to obtain the program that checks to see what sort of error occurred: import math def quadratic(): print("This program finds the real solutions to a quadratic ") a, b, c = (float(s) for 3 in input ("Enter coefficient a, b, c: ").split('; ')] discRoot = math.sqrt(b* b - 4 * a * c) rootl = (-b + discRoot) / (2 * a) root2 = (-b - discRoot) / (2 * a) print(" The solutions are:", rooti, root2 ) IIIIII quadratic()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!