# Python Math Module – Python Tutorials

Welcome back, everyone. In this lecture, we’re going to discuss the built-in modules. That is the Python math module.

It’s essentially just a module that holds a ton of useful math functions. We won’t go through every single one, but we’ll show you how to find them. And then there’s the Python random module that contains a lot of mathematical random functions, as well as random functions for grabbing a random item from a python list.

But let’s explore these in more detail.

## Python Math Modules

If you’re looking for a link to the documentation online, or you can just Google search math python module and you’ll first link will be the official documentation.

Let’s go ahead and start off with the math module going to import math.

``import math``

And if you want to figure out what’s available to you in math, you can actually just call help math.

``help(math)``

## Python Math Methods List

Lets some practical work, How to Round Numbers in Python math Module?

``````value =4.35
math.floor(value)
``````
``Output: 4``

math.floor() method is used to rounds a number DOWN to the nearest integer of the given value.

``math.ceil(value)``
``Output: 5``

math.ciel() method is used to rounds a number UP to the nearest integer of the given value.

## Custom Base

The mathlog() method is used to returns the natural logarithm value of a number or the logarithm of a number to base.

``````
# math.log(x,base)
math.log(100,10)``````

## Trigonometric Functions

Python math module also have trigonometric functions like sin, cos, etc.