Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started