Question: Rstudio 4. Write a function (findQuadraticRoots) that returns the number of real roots of a quadratic equation a x*+b-x+c-0 and retums the values of the
Rstudio
4. Write a function (findQuadraticRoots) that returns the number of real roots of a quadratic equation a x*+b-x+c-0 and retums the values of the real roots. The three input arguments are the coefficients a, b, and c, and the output is a list with two items: a real number (num real) and a vector (roots vec containing the roots. Based on the discriminant D given by the equation, descrim b-4-a c possible function outputs are the following i. If descrim >0, num real
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
