A community for students. Sign up today!
Here's the question you clicked on:
 0 viewing
 one year ago
Hi,i was doing this:
Calculate positive root of the following equation:
34*x^2 + 68*x  510
Recall:
a*x^2 + b*x + c
x1 = (  b + sqrt ( b*b  4*a*c ) ) / ( 2*a )
My answer
>>> a,b,c=34,68,510
>>> import math
>>> x1= (b +math.sqrt(b^24*a*c))/(2*a)
>>> x2=(b math.sqrt(b^24*a*c))/(2*a)
##I should only find positive root so i thought that i can do that way:
if(x1) < 0 ,then x=x2
if(x2) <0 ,then x=x1
print(x)
but there is an error,what am i doing wrong?
 one year ago
Hi,i was doing this: Calculate positive root of the following equation: 34*x^2 + 68*x  510 Recall: a*x^2 + b*x + c x1 = (  b + sqrt ( b*b  4*a*c ) ) / ( 2*a ) My answer >>> a,b,c=34,68,510 >>> import math >>> x1= (b +math.sqrt(b^24*a*c))/(2*a) >>> x2=(b math.sqrt(b^24*a*c))/(2*a) ##I should only find positive root so i thought that i can do that way: if(x1) < 0 ,then x=x2 if(x2) <0 ,then x=x1 print(x) but there is an error,what am i doing wrong?

This Question is Closed

bwCA
 one year ago
Best ResponseYou've already chosen the best response.0what is the error? have you read the tutorial in the python documentation?
Ask your own question
Ask a QuestionFind more explanations on OpenStudy
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.