We all must have come across a huge place full of books in our school or college,
and enjoyed a lot of books like storybooks, lectures books, reference books, and so on.
if we remember, we can remark one thing in all these books will be categorized and kept in different places to access them in an easier way.
All these book varieties further divided into chapters. Can you guess, why this made?
Yeah, you are right. Placing all the pages of one book together, with no chapters, will
make the book boring and difficult to understand. So, dividing a bigger unit into smaller
manageable units is a good strategy.
Likewise, in programming, if we create smaller Noticeable parts, then these parts called modules.
A similar term is a library here. A library refers to a collection of modules that together provides the specific types and needs of applications.
e.g., math (click here to know more about math modules)
by these modules, Python provides us with scientific computational needs,
which is very useful for future technologies like data science, artificial intelligence.
A library points to a collection of modules that together provide a library of the specific types of needs or operations
As stated above,
a library is a collection of modules (and packages) that together provide a particular type of application or operations. A library can have many modules in it.
we can understand more about libraries when we discuss modules.
Some of commonly used Python libraries are:
Python standard library.
This library is distributed in Python contains modules for various types of functions.
Some commonly used modules of Python standard libraries are
|math module|| |
provides mathematical functions to support different types of calculations.
|cmath module||provides mathematical functions for complex numbers|
|random module||provides functions for generating pseudo-random numbers|
| statistics module ||provides mathematical statistics functions.|
|urllib module||provides URL handling functions so that you can access websites within our program.|
Numpy library. This library provides some advanced math functionalities combined with tools to create and calculate numeric arrays.
Scipy library. This is one more useful library that offers algorithmic and mathematical tools for scientific calculations.
Tkinter library. This library provides a traditional Python user interface toolkit and helps us to create a user-friendly GUI interface for different types of applications.
Malplotlib library. this library gives many functions and tools that help us to produce quality output for a variety of formats such as plots, charts, graphs, etc.
these are the most commonly used libraries in python for mathematical and science operations.
modules are the small parts of a library that are separated into individual components and also they are additionally having separate units within themselves to be used in an efficient way.
Advantages of using modules
reduces its complexity to some degree and
creates plenty of well-defined, documented limits within the program
to know more about modules and how to use them and also how to create them on our own click here to know more about modules and their usages