Modules (also called libraries or packages) are useful fragments of code (python instructions) written by other for you to use in your programs.

Your import a given module (that is already installed on your computer) into your program using the keyword:

  import module_name 

In [6]:
import math

math.exp(8) + 7


Out[6]:
2987.9579870417283

In [7]:
from math import cos, sin, tan

In [8]:
sin(8)


Out[8]:
0.9893582466233818

In [9]:
cos(8)


Out[9]:
-0.14550003380861354

In [11]:
math.exp(7)


Out[11]:
1096.6331584284585

In [12]:
from math import *

In [13]:
abs(-98)


Out[13]:
98

In [ ]: