Hi guys. Welcome to another session of python programming. If you are new here please do checkout our previous on python. Also check out our YouTube channel to get the full tutorial on this article.
In this session we are going to see the different math functions and modules in python.
Python has a variety of default functions which do not require any import module. Some of this predefined functions are: input(), int(), float(), type() and many others.
The syntax for this python math module and functions is given below
Python math modulePython has an already default module known as math module which has a list of predefined functions to do mathematical calculations. To first work with this math module, we need an import statement:
import math
Below is a list of table showing some math’s function
- Pi has the mathematical value pi=3.141592.
- Mathematical e has the mathematical value e=2.718281
- The function in python are used directly
Below are some mathematical functions when they are executed in a shell
We have now come to the end of this session. Hope enjoyed this article. Don’t forget to check out the articles on the programming languages guys. Happy coding
Comments
Post a Comment
Please do not enter any spam link in the comment box.