Question: Problem 3 ( 5 0 points ) . The quadratic formula can be used to determine the roots of a quadratic equation r = -
Problem points The quadratic formula can be used to determine the roots of a quadratic equation
Write a script that defines values for variables and and evaluates the roots of the quadratic,
Your script must do the following:
a Ensure the variables and are of either type int or float. No exceptions should be raised meaning the code still fully runs by trying to do math on eg strings, but a warning should be printed for the user.
b Print the roots indicating if the roots are real or complex and if there is one or two unique roots. An example output might look like:
"This quadratic has one real root which is
The output string must be accurate for ANY possible inputs of and
Hint: make use of the typeO function.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
