Prac1 AAM
Prac1 AAM
Aim: - Installation of python, tools and libraries used in python & also study of google
collab:
Introduction to Python: -
Python is a versatile and high-level programming language that has gained widespread popularity for its
simplicity, readability, and flexibility. Guido van Rossum released the first version of Python in 1991, and since
then, it has evolved into a powerful tool used in various domains such as web development, data science,
artificial intelligence, automation, and more.
Libraries in Python:
Library refers to a collection of pre-written code and functionalities that can be used by developers to perform
common tasks without having to implement those functionalities from scratch. Libraries provide a set of
functions, classes, and modules that can be imported and used in Python scripts or applications, allowing
developers to save time and effort by reusing existing code.
Libraries in Python serve various purposes, such as data manipulation, numerical operations, web development,
machine learning, and more. They are typically organized into modules, and each module contains a set of
related functions or classes. Developers can import specific modules or the entire library into their Python
scripts, giving them access to the library's capabilities.
Pandas:
● Explanation: Pandas is a data manipulation and analysis library. It provides data structures like
DataFrames for efficient manipulation and analysis of structured data.
● Example:
● import pandas as pd
●
● # Creating a DataFrame
● data = {'Name': ['Alice', 'Bob', 'Charlie'],
● 'Age': [25, 30, 22]}
● df = pd.DataFrame(data)
●
● # Performing operations on the DataFrame
● mean_age = df['Age'].mean()
Matplotlib:
● Explanation: Matplotlib is a 2D plotting library for creating static, animated, and interactive
visualizations in Python. It provides a wide variety of charts and plots.
● Example:
● import matplotlib.pyplot as plt
●
● # Creating a simple plot
● x = [1, 2, 3, 4, 5]
● y = [2, 4, 6, 8, 10]
● plt.plot(x, y)
● plt.xlabel('X-axis')
● plt.ylabel('Y-axis')
● plt.show()
Python Installation:
We are going to following some steps for installing the latest version of Python for Windows OS:
Step 1: Visit the official Python Website: https://www.python.org/
Step 3: After downloading .exe file, go to File Explorer > Download > and python-3.12.1-amd64.exe file
Step 6: Click on “Disable path length limit” & close the setup:
Step 7: Go to Start > Search for Python > Click & Run the Python CMD:
After this we can use Python directly or with integrate it with an IDE (VS Code) or can download a dedicated
IDE (PyCharm).
Conclusion: Therefore, we now have Downloaded, Installed & Setup Python into the Computer and
successfully performed this practical.