Question: Assignment Specification Develop a program to compute the two roots of a quadratic equation. 1 . Click on the file named lab 0 1 .

Assignment Specification
Develop a program to compute the two roots of a quadratic equation.
1. Click on the file named lab01.py.
2. Modify that program to compute the two roots of a quadratic equation, as described in the program
comments. Note that the program does not perform any error checking, so the results displayed by the
program may not be correct in all cases. For example, when A is zero, the equation is not quadratic
(e.g. if you get a ValueError: math domain error , you have tried to take the square root of a
negative value.). No worries, that is a normal behavior if you used the sqrt function from the math
module of Python. However, if you use exponentiation with (1)/(2), you will not get a ValueError but
instead you will get Complex solution.
We include the round(number, precision) function to round the long result to assist with
automatic checking of your output by Codio.

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!