0% found this document useful (0 votes)
13 views17 pages

Day 1 Overview Python Al ML

Uploaded by

PUBG CLAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views17 pages

Day 1 Overview Python Al ML

Uploaded by

PUBG CLAN
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Overview of Python as an Artificial

Intelligence (AI/ML) language

NIELIT Chandigarh/Ropar

Agenda


OVERVIEW OF PYTHON AS AN AI/ML LANGUAGE

INSTALLATION PYTHON AND EXECUTION OF PROGRAMMES

BASIC PYTHON PROGRAMMING: VARIABLES
OVERVIEW OF PYTHON AS AN AI/ML LANGUAGE
OVERVIEW OF PYTHON AS AN AI/ML LANGUAGE

1. AI- artificial intelligence- 1. Machine learning


2. It is the science of training machines to perform human 2. It is a subset of AI that trains a machine how to
tasks learn
3. The term was invented in the 1950s when scientists 3. It is the art of study of algorithms that learn
began exploring how computers could solve problems from examples and experiences.
on their own. 4. Machine learning is based on the idea that
4. AI is a computer that is given human-like properties. there exist some patterns in the data which are
Like our brain which works effortlessly and seamlessly to be identified and used for future predictions.
to calculate the world around us. 5. The machine does not need to be explicitly
5. Artificial Intelligence is the concept that a computer programmed by people. The programmers give
can do the same. some examples, and the computer is going to
6. It can be said that AI is the large science that mimics learn what to do from those samples.
human aptitudes. 6. The difference from hardcoding rules is that the
machine learns on its own to find such rules.

NIELIT CHANDIGARH 4
OVERVIEW OF PYTHON AS AN AI/ML LANGUAGE

Why Python is Preferred for AI/ML

Python has become the go-to programming language for artificial intelligence (AI) development due to its simplicity
and the powerful suite of libraries it offers

Its syntax is straightforward and closely resembles human language, which reduces the learning curve for developers
and enables them to focus on solving AI problems rather than wrestling with complex coding issues .Python is highly
favoured for AI and machine learning (ML) development for several compelling reasons that make it uniquely
suitable for these technologies:

1)Extensive Libraries and Frameworks: Python boasts a wide range of libraries and frameworks, such as Scikit-learn
for machine learning algorithms, TensorFlow, PyTorch, and Keras for deep learning, as well as NumPy, Pandas, and
Seaborn for data manipulation and visualization. These libraries simplify coding tasks and reduce development time
by providing pre-written code for common tasks​​.

NIELIT CHANDIGARH 5
OVERVIEW OF PYTHON AS AN AI/ML LANGUAGE

2)Ease of Learning and Syntax Simplicity: Python's syntax is straightforward, resembling everyday English, which
significantly lowers the learning curve and enables developers to implement complex AI algorithms efficiently.
The simplicity of Python syntax, which avoids brackets and emphasizes indentation, contributes to its ease of use and
readability, making code less prone to errors and more maintainable​.

3)No Need to Recompile Source Code: Python allows for dynamic modification and execution of code without the need
for recompilation, offering flexibility and speeding up the development process. This feature is particularly
advantageous in AI and ML projects, where iterative testing and tweaking are common​.

4)Platform Independence: Python code can run on various operating systems, including Windows, Mac, UNIX, and
Linux, without requiring any modifications, making it highly versatile for development across different platforms​​.

5)Strong Community Support: Python's large and active community contributes to a wealth of resources, including
tutorials, forums, and documentation, which are invaluable for developers encountering challenges or seeking to
enhance their knowledge and skills in AI and ML​.

NIELIT CHANDIGARH 6
OVERVIEW OF PYTHON AS AN AI/ML LANGUAGE

Artificial Intelligence (AI) is a discipline that focuses on creating intelligent machines that can perform tasks that
typically require human intelligence, such as visual perception, speech recognition, decision-making, and natural
language processing. It involves the development of algorithms and systems that can reason, learn, and make decisions
based on input data.
Essential Python Libraries for AI/ML
For anyone diving into Artificial Intelligence (AI) using Python, a handful of libraries make the development process
significantly smoother and more efficient. These libraries, equipped with pre-built functions and tools, are essentials in
the AI developer's toolkit:

NumPy: Fundamental for scientific computing in Python, NumPy offers comprehensive mathematical functions,
random number generators, linear algebra routines, Fourier transforms, and more. It's particularly useful for handling
large, multi-dimensional arrays and matrices, which are prevalent in AI tasks​​.

Pandas: A library offering high-level data structures and tools designed to make data analysis fast and easy in Python.
Pandas are ideal for data munging and preparation and can be used in conjunction with other data analysis workflows
in Python​.

NIELIT CHANDIGARH 7
OVERVIEW OF PYTHON AS AN AI/ML LANGUAGE

Matplotlib: This plotting library allows for the creation of


static, animated, and interactive visualizations in Python.
Visual data representation is crucial in AI for data
exploration and the presentation of results​.
TensorFlow: An open-source library developed by the
Google Brain team, TensorFlow is used for numerical
computation using data flow graphs. It's particularly known
for its applications in deep learning and neural networks​.

PyTorch: Developed by Facebook's AI Research lab, PyTorch


is a library for machine learning that provides great
flexibility and speed while working with deep learning
projects. It's known for its ease of use and efficiency in
creating complex AI models​​.

NIELIT CHANDIGARH 8
PYTHON INSTALLATION (OFFLINE MODE)

Step 1: Select Version to Install Python

Visit the official page for Python https://www.python.org/downloads/ on the Windows operating system. Locate a reliable version of Python 3, preferably
version 3.10.11, which was used in testing this tutorial. Choose the correct link for your device from the options provided: either Windows installer (64-
bit) or Windows installer (32-bit) and proceed .

STEP 2:Download the executable file.

Once you have downloaded the installer, open the .exe file, such as python-3.10.11-amd64.exe, by double-clicking it to launch the Python installer. Choose
the option to Install the launcher for all users by checking the corresponding checkbox, so that all users of the computer can access the Python launcher
application.Enable users to run Python from the command line by checking the Add python.exe to PATH checkbox.

Step 3: Running the Executable Installer

After completing the setup. Python will be installed on your Windows system. You will see a successful message.

Step 4: Verify the Python Installation in Windows

Close the window after successful installation of Python. You can check if the installation of Python was successful by using either the command line or the
Integrated Development Environment (IDLE), which you may have installed. To access the command line, click on the Start menu and type “cmd” in the
search bar. Then click on Command Prompt.python --version

NIELIT CHANDIGARH 9
How to install Python on Windows? (OFFLINE MODE)

NIELIT CHANDIGARH 10
PYTHON IDE ONLINE MODE STEP 1 &STEP2

NIELIT CHANDIGARH 11
Google Colab STEP 1 & STEP2

NIELIT CHANDIGARH 12
VARIABLE
Python Variable is containers that store values. Python is not “statically typed”.
Rules for Python variables

• A Python variable name must start with a letter or the underscore character.

• A Python variable name cannot start with a number.

• A Python variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ ).

• Variable in Python names are case-sensitive (name, Name, and NAME are three different variables).

• The RESERVED WORD in Python cannot be used to name the variable in Python.

NIELIT CHANDIGARH 13
PRACTICAL 1 PRACTICAL-2
PROGRAM TO DIFFERENTIATE DATA TYPE PROGRAM TO USE OF VAR & EXPRESSIONS

NIELIT CHANDIGARH 14
PRACTICAL 3
CALCULATION OF SIMPLE INTEREST

NIELIT CHANDIGARH 15
ANY
QUERIES??
Thankyou!!!!

NIELIT CHANDIGARH 17

You might also like