March 2023
Intermediate to advanced
326 pages
7h 11m
English
We have seen how to raise numbers to powers with the ** operator. What about calculating something like ? There are multiple ways to do this, but each of them requires that we ask Python to use a set of tools that is not included in the core Python language. Such a set of tools is called a library or package. To access the package, we use the import command. There are at least two packages that contain the tools we need to compute : the math package and the numpy package. Within the math package, there is a method or object called e that represents the number e as we know it. To access the object, we use math.e. The import statement is used to make the package available to Python. ...
Read now
Unlock full access