Modules in Python
To perform specific functions like add, subtract, power, square root, we need to write two three lines of logic to make our task or function work properly. So we have built in functions inside those modules which can straight away perform those task by passing the values to calculate.
Here you will learn about some of the built-in modules used in Python programming language.
We simply have to import those built in modules present inside the program then we can easily perform those specific task after calling those functions.
Some of the modules that are used in Python are :
math, datetime, decimal, operator, test, user, sets, etc.
Output
4.0
The above given example is of math module. Here math module is imported, with the help of which, complex mathematical calculations can be performed.
Program
Output
5.0
3.141592653589793
114.59155902616465
1.0471975511965976
0.9092974268256817
24