Question
PYTHON 3 A quadratic equation is an equation of the form Ax 2 +Bx+C. A, B, and C are the coefficients of the equation, and
PYTHON 3
A quadratic equation is an equation of the form Ax2+Bx+C. A, B, and C are the coefficients of the equation, and the roots are the values of x at which the equation evaluates to 0, and the well-known quadratic formula is often used to find these roots.
Write a program that asks a user for the 3 coefficients and outputs the roots of that equation. Be aware of the following:
Be sure that your request for input and your output both have descriptive text.
Be sure to handle the cases where some or even all of the coefficients are 0.
If the roots have an imaginary component, use i when representing the imaginary term in the output. For example, you may output 3 + 7i as a root.
There could be 2 roots, 1 root, no roots, or infinite roots. If 1 or 2, you should output those. If no roots or infinite roots, you should output text stating that.
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