Day 1 Overview Python Al ML
Day 1 Overview Python Al ML
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
NIELIT CHANDIGARH 4
OVERVIEW OF PYTHON AS AN AI/ML LANGUAGE
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
NIELIT CHANDIGARH 8
PYTHON INSTALLATION (OFFLINE MODE)
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 .
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.
After completing the setup. Python will be installed on your Windows system. You will see a successful message.
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 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