Question: Calculate the Discriminant: write a function called discriminant that takes as parameters three floats a , b , and c , and returns the value

Calculate the Discriminant: write a function called discriminant that takes as parameters three floats a, b, and c, and returns the value of b^2-4ac
Check for the existance of real roots: write a function called has_real_root that takes three float a,b and c as parameters, and returns True if the discriminant is larger than or equal to 0 and False otherwise. Calculate the roots of a quadratic equation: Write a function called get_real_roots
1. Take three floats a,b,and c as perameters and retun the two roots as a tuple
(two roots x1=-b-d/2a and x2=-b+d/2a)
(python language)

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!