Error with math.sqrt
rosuav at gmail.com
Sat Jan 7 19:23:29 EST 2017
On Sun, Jan 8, 2017 at 11:15 AM, Jack Harvey <jackrharvey at hotmail.com> wrote:
> I'm starting out with Python 3.5. My current frustration is with:
> Traceback (most recent call last):
> File "<pyshell#0>", line 1, in <module>
> NameError: name 'math' is not defined
A lot of Python's features are in what's called the "standard library"
- a set of modules that you can call up with the 'import' statement.
In this case, all you need is to start with this line:
Once you do that, everything in the math module (including math.sqrt)
should be available.
More information about the Python-list