Question: use python Design a function called print_real_roots that takes three floating point values representing the values of a, b and c in a quadratic equation
use python
Design a function called print_real_roots that takes three floating point values representing the values of a, b and c in a quadratic equation and calculates the real roots of that equation. The function should print the roots formatted to 3 decimal places separated by a comma. Recall, the real roots of the quadratic equation ax + bx +C =0 are given by the formula: -b + Vb2 - 4ac 2a assuming that the discriminant is 0 or more (ie. b - 4ac 20). x = Example: >>> print_real_roots (2, 3, -1) 0.281 , -1.781 In the case when b - 4ac
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
