Question: python # Question 2 def quadratic(a, b, c): solve the quadratic equation ax^2+bx+c=0, and return the answer as requested in the text of the

python
# Question 2 def quadratic(a, b, c): """ solve the quadratic equation ax^2+bx+c=0, and return the answer as requested in the text of the question" # insert your code here # note: the output of your print commands does not have to look identical # to what is shown here, but must give the correct text and the correct value(s) print (quadratic(1,5,6)) # should print (real distinct roots', [-2.0, -3.0]) print (quadratic(1,-22,121)) # should print ('repeated real root', [11.01) print (quadratic(1,-8,65)) # should print ('complex conjugate roots', [(4+7;), (4-7)))) print (quadratic(1,0,1)) # should print ('complex conjugate roots', [1], -1jl) print (quadratic(1,-1,0)) # should print ('real distinct roots', (1.0, 0.01)
Step by Step Solution
There are 3 Steps involved in it
To solve the quadratic equation ax2 bx c 0 we use the quadratic formula x fracb pm sqrtb2 4ac2a The ... View full answer
Get step-by-step solutions from verified subject matter experts
