Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
prochrono
Group Title
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!
 11 months ago
 11 months ago
prochrono Group Title
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!
 11 months ago
 11 months ago

This Question is Open

e.mccormick Group TitleBest ResponseYou've already chosen the best response.0
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.
 11 months ago

mihirb Group TitleBest ResponseYou've already chosen the best response.0
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 =",(bsqrt(d))/(2*a))
 8 months ago
See more questions >>>
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.