Question: (a) Write a Python function called lroot to calculate the largest root of the quadratic equation ax +bx+c= 0. Your function should take the
(a) Write a Python function called lroot to calculate the largest root of the quadratic equation ax +bx+c= 0. Your function should take the coefficients a, b and c as arguments and return the largest root of the equation. (b) Write a Python function called nroot that takes the coefficients a, b and c of the quadratic equation as arguments, and returns the number of real roots of the equation. (c) Use your functions from parts (a) and (b) to calculate the largest root and the number of real roots of the equation 5x2+8x 2 =0. Activate Windows
Step by Step Solution
3.47 Rating (167 Votes )
There are 3 Steps involved in it
Python import math def lroota b c discriminant b 2 4... View full answer
Get step-by-step solutions from verified subject matter experts
