WeCodeAcademy

Modules and Imports

A module is a file of ready-made code. import brings it in. Python ships with many, such as math, random and datetime.

Examplepython
Open in editor »
Quick check

Which line makes the `math` module available?

Your turn: write the code

Import the math module and print the square root of 144.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.