Answered step by step
Verified Expert Solution
Link Copied!

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 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
image text in transcribed

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

Step: 3

blur-text-image

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

Professional SQL Server 2012 Internals And Troubleshooting

Authors: Christian Bolton, Justin Langford

1st Edition

1118177657, 9781118177655

More Books

Students also viewed these Databases questions

Question

Explain why employees join unions.

Answered: 1 week ago

Question

Explain the sources of recruitment.

Answered: 1 week ago

Question

Differentiate sin(5x+2)

Answered: 1 week ago

Question

Compute the derivative f(x)=1/ax+bx

Answered: 1 week ago

Question

What is job enlargement ?

Answered: 1 week ago

Question

=+such as the dirigenti in Italy?

Answered: 1 week ago

Question

=+ Are there closed-shop requirements or practices?

Answered: 1 week ago