Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases Demystified

Authors: Andrew Oppel

1st Edition

0072253649, 9780072253641

More Books

Students also viewed these Databases questions

Question

Know how to use reservations systems to inventory demand.

Answered: 1 week ago

Question

What is topology? Explain with examples

Answered: 1 week ago

Question

How do Data Types perform data validation?

Answered: 1 week ago

Question

How does Referential Integrity work?

Answered: 1 week ago