decision structures abc input("please enter the coefficients (abc)"discroot math sqrt( croot (- discroot( aroot (- discroot( aprint "\nthe solutions are:"root root except valueerrorprint "\nno real rootsmain(notice that this is basically the very first version of the quadratic program with the addition of try except around the heart of the program try statement has the general formtryexcept when python encounters try statementit attempts to execute the statements inside the body if these statements execute without errorcontrol then passes to the next statement after the try except if an error occurs somewhere in the bodypython looks for an except clause with matching error type if suitable except is foundthe handler code is executed the original program without the exception-handling produced the following errortraceback (most recent call last)file "quadratic py"line in main(file "quadratic py"line in main discroot math sqrt( cvalueerrormath domain error the last line of this error message indicates the type of error that was generatednamely an valueerror the updated version of the program provides an except clause to catch the valueerror here is the error handling version in actionthis program finds the real solutions to quadratic please enter the coefficients (abc) , , no real roots instead of crashingthe exception handler catches the error and prints message indicating that the equation does not have real roots the nice thing about the try except statement is that it can be used to catch any kind of erroreven ones that might be difficult to test forand hopefullyprovide graceful exit for examplein the quadratic solverthere are lots of other things that could go wrong besides having