Page 445 - AI Ver 3.0 class 10_Flipbook
P. 445
Reboot
• What are conditional statements?
• What are the different kinds of loop?
Modules and Packages
A module is a Python file (.py) that contains Python code, including functions, classes, and variables, which can
be reused in other programs. Modules help in structuring code efficiently by breaking it into manageable parts.
A package is a collection of related Python modules organized within a directory. It typically includes an __init__.
py file, which indicates that the directory should be treated as a package. Python provides numerous built-in and
third-party packages to simplify coding tasks.
Below are some commonly used Python packages:
• NumPy: NumPy (Numerical Python) is a library for numerical computing. It provides support for multidimensional
arrays and matrices, along with a collection of mathematical functions for efficient operations. It is widely used
in data analysis, scientific computing, and Machine Learning due to its high performance and ease of use.
• Pandas: Pandas is a Python library for data manipulation and analysis. It offers powerful data structures like
Series and DataFrames for handling structured data. It simplifies tasks like data cleaning, transformation, and
aggregation, making it essential for data science workflows.
• Matplotlib: Matplotlib is a widely used Python library for data visualization. It allows the creation of static,
animated, and interactive visualizations such as line charts, bar graphs, and scatter plots. It serves as a foundation
for other visualization libraries like Seaborn and is widely used in data analysis and scientific research.
• SciPy: It used for scientific and technical computing. It builds on NumPy and provides a wide range of functions
for optimisation, integration, interpolation, eigenvalue problems, and other advanced mathematical tasks. It is
commonly used in fields like physics, engineering, and data science.
• NLTK: NLTK (Natural Language Toolkit) is a Python library designed for Natural Language Processing (NLP). It
provides tools for tasks such as tokenization, stemming, and sentiment analysis. It is extensively used in natural
language processing (NLP) research and educational purposes due to its comprehensive features and datasets.
• OpenCV: OpenCV (Open-Source Computer Vision Library) is a powerful library for computer vision tasks. It
enables image processing, video analysis, and object detection. It supports multiple programming languages
and is extensively used in real-time applications, including facial recognition and augmented reality.
Advance Python (Practical) 443

