I just began the course yesterday and am very new to this. The very first question "Positive root of the following equation: 34*x^2 + 68*x - 510" is giving me problems. After some research, I put in "positive_root = (34*x^2 + 68*x - 510)" but received the error that x is not defined. Dumb question I'm sure, but you have to start somewhere.
use descriminant formula-->x=(-b+math.sqrt(b**2+4*a*c)/2*a where a*x**2+b*x+c=0 remember there are two answers one written above another is the same exceppt we change sign -math.sqrt(...).Also don't forget to type from math import * .Hope it helps.
Thanks so much. I will check it out and let you know.
The other thing I notice is the error that x is not defined come from the fact that you used a variable before declaring it. You have to initialize x before using it in an expression.
Join our real-time social learning platform and learn together with your friends!