Question: Problem 9 Remember the quadratic equation? a x 2 + b x + c = 0 . There are at most two possible solutions for

Problem 9
Remember the quadratic equation? ax2+bx+c=0. There are at most two possible solutions for this equation. They may be real or
imaginary. The solutions are given by the following formula:
x=-b+-b2-4ac22a
The equation may have only one root or two roots. or imaginary roots. The discriminant b2-4ac determines the number of roots by the
following rules:
If b2-4ac>0, then the equation has two real roots.
If b2-4ac=0, then the equation has one real root.
If b2-4ac0, then the equation has two imaginary roots.
Write a program that takes the values of a,b, and c as input and prints the roots of the equation. If the equation has no real roots, print a
message: "The equation has no real roots". If real root/roots exist, print the roots in the following format:
Sample Input 01:
Enter a: 1
Enter b: 2
Enter c: 1
Sample Output 01:
The equation has one real root: -1.0
Sample Input 02:
Solve this in Python pls
 Problem 9 Remember the quadratic equation? ax2+bx+c=0. There are at most

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!