Ace school

with brainly

  • Get help from millions of students
  • Learn from experts with step-by-step explanations
  • Level-up by helping others

A community for students.

Quadratic Formula: I started working on the MIT 6.189 course and am stuck on Exercise 2.5 where I'm asked to calculate the roots of a quadratic equation. My question is if we will be inputting an equation to first check that it is indeed a quadratic equation and then proceed to calculate its roots or if this question already assumes that this has been confirmed and we will only be entering the equation's coefficients. If the former, what would the three arguments/parameters be? thanks!

MIT 6.189 A Gentle Introduction to Programming Using Python (OCW)
See more answers at brainly.com
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Join Brainly to access

this expert answer

SEE EXPERT ANSWER

To see the expert answer you'll need to create a free account at Brainly

It asks the user to input a quadratic as three inputs. In your question, you answered what the three inputs needed are. The three coefficients of the powers when the quadratic is in the form of: \(ax^2+bx^1+cx^0\). You just need a, b, and c.
from math import sqrt a=1 b=2 c=1 d=(b**2)-(4*(a*c)) if (d<0): print("there are no real solutions") if(d==0): print("the solution is x =",-b/(2*a)) if(d>0): print("there are two solutions") print("the first solution is x =",(-b+sqrt(d))/(2*a)) print("the second solution is x =",(-b-sqrt(d))/(2*a))

Not the answer you are looking for?

Search for more explanations.

Ask your own question

Other answers:

Not the answer you are looking for?

Search for more explanations.

Ask your own question