Question: Implement quadratic.py ( 1 point ) This program will first ask the user to enter three integers, representing the parameters a , b and c

Implement
quadratic.py (1 point)
This program will first ask the user to enter three integers, representing the parameters a,b and c in
the standard form of a quadratic equation ax2+bx+c=0. It will then solve for the two roots of
the quadratic equation and print them as floating point numbers on separate lines.
The root formula for a quadratic equation is:
I
x=-b+-b2-4ac22a
Note that a quadratic equation may have 2 roots, or no root at all (in the case that b2-4ac0). For
this question, the autograder will always use a,b and c that guarantee b2-4ac>0, so it always has
two roots. Therefore you do NOT need to check for the validity of a,b and c.
Running a correct implementation of this program could look like:
Enter a: 1
Enter b:-3
Enter c:2
1**x???2+-3**x+2 has roots:
1.0
2.0
Formatting details:
The output should be two floating point numbers on separate lines.
There is no specific ordering of the two roots: you can print the smaller root first, or the larger
one first. It's up to you.
The numbers on the last two lines must be the solutions. Do NOT print extra lines.
 Implement quadratic.py (1 point) This program will first ask the user

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!