Question: Problem 9 Remember the quadratic equation? a x 2 + b x + c = 0 . There are at most two possible solutions for
Problem
Remember the quadratic equation? There are at most two possible solutions for this equation. They may be real or
imaginary. The solutions are given by the following formula:
The equation may have only one root or two roots. or imaginary roots. The discriminant determines the number of roots by the
following rules:
If then the equation has two real roots.
If then the equation has one real root.
If then the equation has two imaginary roots.
Write a program that takes the values of and 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 rootroots exist, print the roots in the following format:
Sample Input :
Enter a:
Enter b:
Enter c:
Sample Output :
The equation has one real root:
Sample Input :
Solve this in Python pls
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
