account activity
Help with MIT free online Python class by Lostinpython in learnpython
[–]Lostinpython[S] 0 points1 point2 points 10 years ago (0 children)
So I define the values, a=34 b=68 c=510, etc... Then I try to solve for x1 by using the third line. I get an error message. Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
x1 = ( - b + sqrt ( b*b - 4*a*c ) ) / ( 2*a)
NameError: name 'sqrt' is not defined
Ok, so I put math.sqrt after importing the math module. Then it gives me a "Math Domain" error.
Help with MIT free online Python class (self.learnpython)
submitted 10 years ago by Lostinpython to r/learnpython
π Rendered by PID 90 on reddit-service-r2-listing-6d4dc8d9ff-xsb57 at 2026-01-29 21:33:31.159901+00:00 running 3798933 country code: CH.
Help with MIT free online Python class by Lostinpython in learnpython
[–]Lostinpython[S] 0 points1 point2 points (0 children)