SlideShare a Scribd company logo
Dinesh Thakur--Python Programming
Guido Van Rossum is known as
the founder of Python
programming
Dinesh Thakur--Python Programming
Python History
• Python was invented by Guido van Rossum in 1991 at
CWI in Netherland. The idea of Python programming
language has taken from the ABC programming
language or we can say that ABC is a predecessor of
Python language.
• There is also a fact behind the choosing name Python.
Guido van Rossum was a fan of the popular BBC
comedy show of that time, "Monty Python's Flying
Circus". So he decided to pick the name Python for his
newly created programming language.
• Python has the vast community across the world and
releases its version within the short period.
Dinesh Thakur--Python Programming
What is Python ?
• Python is a simple, general purpose, high
level, interpreted, object oriented language
which is used to develop desktop applications,
web applications and mobile applications.
• Python is also used in data science, artificial
intelligence and machine learning area.
Dinesh Thakur--Python Programming
Python Features
• Python provides many useful features which make it
popular and valuable from the other programming
languages.
1. Easy to Learn and Use:
• Python is easy to learn as compared to other
programming languages. Its syntax is straightforward
and much the same as the English language. There is
no use of the semicolon or curly-bracket, the
indentation defines the code block. It is the
recommended programming language for beginners.
Dinesh Thakur--Python Programming
2.Expressive Language
Python can perform complex tasks using a few lines of code. A simple example, the hello
world program you simply type print("Hello World"). It will take only one line to execute,
while Java or C takes multiple lines.
3.Interpreted Language
Python is an interpreted language; it means the Python program is executed one line at a
time. The advantage of being interpreted language, it makes debugging easy and portable.
4. Cross-platform Language
Python can run equally on different platforms such as Windows, Linux, UNIX, and
Macintosh, etc. So, we can say that Python is a portable language. It enables
programmers to develop the software for several competing platforms by writing a
program only once.
5. Object-Oriented Language
Python supports object-oriented language and concepts of classes and objects come
into existence. It supports inheritance, polymorphism, and encapsulation, etc. The
object-oriented procedure helps to programmer to write reusable code and develop
applications in less code.
Dinesh Thakur--Python Programming
6. Free and Open Source
Python is freely available for everyone. It is freely available on its official
website www.python.org. It has a large community across the world that is dedicatedly
working towards make new python modules and functions. Anyone can contribute to the
Python community. The open-source means, "Anyone can download its source code
without paying any penny."
7. Large Standard Library
It provides a vast range of libraries for the various fields such as machine learning, web
developer, and also for the scripting. There are various machine learning libraries, such
as Tensor flow, Pandas, Numpy, Keras, and Pytorch, etc. Django, flask, pyramids are the
popular framework for Python web development.
8.GUI Programming Support
Graphical User Interface is used for the developing Desktop application. PyQT5,
Tkinter, Kivy are the libraries which are used for developing the web application.
Dinesh Thakur--Python Programming
How to Install Python (Environment
Set-up)
• Installation on Windows
• Visit the
link https://www.python.org/downloads/ to
download the latest release of Python. In this
process, we will install Python 3.8.6 on
our Windows operating system. When we click on
the above link, it will bring us the following page.
• Step - 1: Select the Python's version to
download.
Dinesh Thakur--Python Programming
Step - 1: Select the Python's version
to download.
Dinesh Thakur--Python Programming
Step - 2: Click on the Install Now
Dinesh Thakur--Python Programming
Step - 3 Installation in Process
Dinesh Thakur--Python Programming
Now, try to run python on the
command prompt.
Dinesh Thakur--Python Programming
Python First Program
Dinesh Thakur--Python Programming
Program-2
Dinesh Thakur--Python Programming
Python Keywords
• Python Keywords are special reserved words
that convey a special meaning to the
compiler/interpreter. Each keyword has a
special meaning and a specific operation.
These keywords can't be used as a variable.
Following is the List of Python Keywords.
Dinesh Thakur--Python Programming
Python Keywords
True False None and as
asset def class continue break
else finally elif del except
global for if from import
raise try or return pass
nonlocal in not is lambda
Dinesh Thakur--Python Programming
Python Identifiers
Python identifiers refer to a name used to identify a
variable, function, module, class, module or other
objects. There are few rules to follow while naming the
Python Variable.
• A variable name must start with either an English letter
or underscore (_).
• A variable name cannot start with the number.
• Special characters are not allowed in the variable
name.
• The variable's name is case sensitive.
Dinesh Thakur--Python Programming
Python Variables
• Variable is a named storage location where we
can store value and perform
manipulation(calculation) on stored value
during execution of a program.
• Example: a = 50
Dinesh Thakur--Python Programming
Variable
a=50
Dinesh Thakur--Python Programming
Variable Program
Dinesh Thakur--Python Programming
Variable Program
Dinesh Thakur--Python Programming
Python Data Types
• Variables can hold values, and every value has
a data-type. Python is a dynamically typed
language; hence we do not need to define the
type of the variable while declaring it. The
interpreter implicitly(directly) binds the value
with its type.
• a=10
Dinesh Thakur--Python Programming
Python Data Types Program
Dinesh Thakur--Python Programming
Python data types
Dinesh Thakur--Python Programming
Number Data Type
Dinesh Thakur--Python Programming
Boolean
• Boolean type provides two built-in values, True
and False. These values are used to determine
the given statement true or false. It denotes by
the class bool. True can be represented by any
non-zero value or 'T' whereas false can be
represented by the 0 or 'F'. Consider the
following example.
• # Python program to check the boolean type
• print(type(True))
• print(type(False))
• print(false)
Dinesh Thakur--Python Programming
Dinesh Thakur--Python Programming
List
Python Lists are similar to arrays in C. However, the list
can contain data of different types. The items stored in
the list are separated with a comma (,) and enclosed
within square brackets [].
Dinesh Thakur--Python Programming
Tuple
A tuple is similar to the list in many ways. Like lists,
tuples also contain the collection of the items of
different data types. The items of the tuple are
separated with a comma (,) and enclosed in
parentheses ().
A tuple is a read-only data structure as we can't modify
the size and value of the items of a tuple.
Dinesh Thakur--Python Programming
Dictionary Data Type
• Dictionary is an unordered set of a key-value
pair of items. It is like an associative array or a
hash table where each key stores a specific
value. Key can hold any primitive data type,
whereas value is an arbitrary Python object.
• The items in the dictionary are separated with
the comma (,) and enclosed in the curly braces
{}.
Dinesh Thakur--Python Programming
Dictionary Data Type Program
Dinesh Thakur--Python Programming
Set Data Type
• Python Set is the unordered collection of the
data type. It is iterable, mutable(can modify
after creation), and has unique elements. In
set, the order of the elements is undefined; it
may return the changed sequence of the
element. The set is created by using a built-in
function set(), or a sequence of elements is
passed in the curly braces and separated by
the comma. It can contain various types of
values.
Dinesh Thakur--Python Programming
SET program
Dinesh Thakur--Python Programming
Operators
• Operator performs operation on operands or
data.
• Arithmetic operator : +,-,/,%,and *
• E.g. 2+2 , 8*2
• Comparison Operator: <,>,=<,>=,!=
• E.g. 7>2 , 2<9
• Assignment Operator: = , =* , =+ ,=-
• 2+2=4
Dinesh Thakur--Python Programming
Operators
• Bitwise Operators : performs operation on
binary digits only. >> ,<<,>>>,<<<
• E.g >> Right Shift 2 digit
• >>11111111-----00111111
Dinesh Thakur--Python Programming
Logical Operators
Dinesh Thakur--Python Programming
Membership Operators
• Python membership operators are used to
check the membership of value inside a
Python data structure. If the value is present
in the data structure, then the resulting value
is true otherwise it returns false.
• IN
• Not IN
Dinesh Thakur--Python Programming
Operators Program
Dinesh Thakur--Python Programming
Multiplications
Dinesh Thakur--Python Programming
Comparison Operator
Dinesh Thakur--Python Programming
Comments
• If we want to write additional information of
program, we use comment.
• # is used for comment
Dinesh Thakur--Python Programming
Comments
Dinesh Thakur--Python Programming
Decision Making Statement
If…..Satement
If…..Else…..Statement
Dinesh Thakur--Python Programming
If…Statement
Dinesh Thakur--Python Programming
If…Statement
Dinesh Thakur--Python Programming
If….Else….Statement
Dinesh Thakur--Python Programming
IF..Else…Statement
Dinesh Thakur--Python Programming
Looping Statement
For…Loop
Do….While…Loop
While…Loop
Dinesh Thakur--Python Programming
for…Loop
Dinesh Thakur--Python Programming
For….Loop
Dinesh Thakur--Python Programming
Multiplication Table
Dinesh Thakur--Python Programming
While…Loop
Dinesh Thakur--Python Programming
While…Loop
Dinesh Thakur--Python Programming
Do…While…Loop
Dinesh Thakur--Python Programming
Python Popular Frameworks and
Libraries
• Python has wide range of libraries and frameworks
widely used in various fields such as machine learning,
artificial intelligence, web applications, etc. We define
some popular frameworks and libraries of Python as
follows.
• Web development (Server-side) - Django Flask,
Pyramid, CherryPy
• GUIs based applications - Tk, PyGTK, PyQt, PyJs, etc.
• Machine Learning - TensorFlow, PyTorch, Scikit-learn,
Matplotlib, Scipy, etc.
• Mathematics - Numpy, Pandas, etc.
Dinesh Thakur--Python Programming
Thanks
Dinesh Thakur--Python Programming

More Related Content

PDF
Generative AI
PDF
Introduction to AI & ML
PDF
AI and machine learning
 
PDF
Introduction to Artificial Intelligence and few examples
PPTX
Sentiment analysis
PDF
Generative AI for the rest of us
PDF
Topic Modeling
PPTX
Deep Learning Explained
Generative AI
Introduction to AI & ML
AI and machine learning
 
Introduction to Artificial Intelligence and few examples
Sentiment analysis
Generative AI for the rest of us
Topic Modeling
Deep Learning Explained

What's hot (20)

PPTX
Data Wrangling
PPTX
Artificial intelligence
PDF
Ai Ethics
PPTX
Future of AI - 2023 07 25.pptx
PDF
7 Big Data Challenges and How to Overcome Them
PPT
Lect#1 (Artificial Intelligence )
PPTX
Machine Learning
PPTX
Big Data Analytics
PDF
Edge Computing
PPTX
Machine Learning - Dataset Preparation
PPT
Machine Learning
PDF
An Introduction to Generative AI
PPTX
Presentation on Sentiment Analysis
PPTX
Selected topics in Computer Science
PPT
Big data ppt
PPTX
Cognitive Computing
PPTX
Introduction to ML (Machine Learning)
PDF
Ethics in the use of Data & AI
PPTX
Text MIning
PPT
5.4 randomized datastructures
Data Wrangling
Artificial intelligence
Ai Ethics
Future of AI - 2023 07 25.pptx
7 Big Data Challenges and How to Overcome Them
Lect#1 (Artificial Intelligence )
Machine Learning
Big Data Analytics
Edge Computing
Machine Learning - Dataset Preparation
Machine Learning
An Introduction to Generative AI
Presentation on Sentiment Analysis
Selected topics in Computer Science
Big data ppt
Cognitive Computing
Introduction to ML (Machine Learning)
Ethics in the use of Data & AI
Text MIning
5.4 randomized datastructures
Ad

Similar to Python Programming.pptx (20)

PPTX
python introduction initial lecture unit1.pptx
PDF
python-160403194316.pdf
PPTX
Python Seminar PPT
PPTX
Python
PPTX
pengenalan python apa itu python untuk apa.pptx
PPTX
Python basics
PDF
introduction of python in data science
PPTX
Python Programming-1.pptx of python by computer
PPTX
Python Introduction
PDF
Introduction of Python
PPT
Python - Module 1.ppt
PPTX
Python - An Introduction
PDF
COMPUTER 8 Grade 8 - Intro to Python.pdf
PPTX
cupdf.com_python-seminar-ppt.pptx.........
PPTX
Python ppt_118.pptx
PPTX
python presntation 2.pptx
PPTX
Python programming
ODP
James Jesus Bermas on Crash Course on Python
PDF
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
python introduction initial lecture unit1.pptx
python-160403194316.pdf
Python Seminar PPT
Python
pengenalan python apa itu python untuk apa.pptx
Python basics
introduction of python in data science
Python Programming-1.pptx of python by computer
Python Introduction
Introduction of Python
Python - Module 1.ppt
Python - An Introduction
COMPUTER 8 Grade 8 - Intro to Python.pdf
cupdf.com_python-seminar-ppt.pptx.........
Python ppt_118.pptx
python presntation 2.pptx
Python programming
James Jesus Bermas on Crash Course on Python
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Ad

Recently uploaded (20)

PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Basic Mud Logging Guide for educational purpose
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Insiders guide to clinical Medicine.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
PPH.pptx obstetrics and gynecology in nursing
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Lesson notes of climatology university.
PDF
Pre independence Education in Inndia.pdf
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Microbial disease of the cardiovascular and lymphatic systems
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Abdominal Access Techniques with Prof. Dr. R K Mishra
Basic Mud Logging Guide for educational purpose
O7-L3 Supply Chain Operations - ICLT Program
Insiders guide to clinical Medicine.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Supply Chain Operations Speaking Notes -ICLT Program
PPH.pptx obstetrics and gynecology in nursing
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Sports Quiz easy sports quiz sports quiz
Microbial diseases, their pathogenesis and prophylaxis
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
TR - Agricultural Crops Production NC III.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
2.FourierTransform-ShortQuestionswithAnswers.pdf
Lesson notes of climatology university.
Pre independence Education in Inndia.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Microbial disease of the cardiovascular and lymphatic systems

Python Programming.pptx

  • 2. Guido Van Rossum is known as the founder of Python programming Dinesh Thakur--Python Programming
  • 3. Python History • Python was invented by Guido van Rossum in 1991 at CWI in Netherland. The idea of Python programming language has taken from the ABC programming language or we can say that ABC is a predecessor of Python language. • There is also a fact behind the choosing name Python. Guido van Rossum was a fan of the popular BBC comedy show of that time, "Monty Python's Flying Circus". So he decided to pick the name Python for his newly created programming language. • Python has the vast community across the world and releases its version within the short period. Dinesh Thakur--Python Programming
  • 4. What is Python ? • Python is a simple, general purpose, high level, interpreted, object oriented language which is used to develop desktop applications, web applications and mobile applications. • Python is also used in data science, artificial intelligence and machine learning area. Dinesh Thakur--Python Programming
  • 5. Python Features • Python provides many useful features which make it popular and valuable from the other programming languages. 1. Easy to Learn and Use: • Python is easy to learn as compared to other programming languages. Its syntax is straightforward and much the same as the English language. There is no use of the semicolon or curly-bracket, the indentation defines the code block. It is the recommended programming language for beginners. Dinesh Thakur--Python Programming
  • 6. 2.Expressive Language Python can perform complex tasks using a few lines of code. A simple example, the hello world program you simply type print("Hello World"). It will take only one line to execute, while Java or C takes multiple lines. 3.Interpreted Language Python is an interpreted language; it means the Python program is executed one line at a time. The advantage of being interpreted language, it makes debugging easy and portable. 4. Cross-platform Language Python can run equally on different platforms such as Windows, Linux, UNIX, and Macintosh, etc. So, we can say that Python is a portable language. It enables programmers to develop the software for several competing platforms by writing a program only once. 5. Object-Oriented Language Python supports object-oriented language and concepts of classes and objects come into existence. It supports inheritance, polymorphism, and encapsulation, etc. The object-oriented procedure helps to programmer to write reusable code and develop applications in less code. Dinesh Thakur--Python Programming
  • 7. 6. Free and Open Source Python is freely available for everyone. It is freely available on its official website www.python.org. It has a large community across the world that is dedicatedly working towards make new python modules and functions. Anyone can contribute to the Python community. The open-source means, "Anyone can download its source code without paying any penny." 7. Large Standard Library It provides a vast range of libraries for the various fields such as machine learning, web developer, and also for the scripting. There are various machine learning libraries, such as Tensor flow, Pandas, Numpy, Keras, and Pytorch, etc. Django, flask, pyramids are the popular framework for Python web development. 8.GUI Programming Support Graphical User Interface is used for the developing Desktop application. PyQT5, Tkinter, Kivy are the libraries which are used for developing the web application. Dinesh Thakur--Python Programming
  • 8. How to Install Python (Environment Set-up) • Installation on Windows • Visit the link https://www.python.org/downloads/ to download the latest release of Python. In this process, we will install Python 3.8.6 on our Windows operating system. When we click on the above link, it will bring us the following page. • Step - 1: Select the Python's version to download. Dinesh Thakur--Python Programming
  • 9. Step - 1: Select the Python's version to download. Dinesh Thakur--Python Programming
  • 10. Step - 2: Click on the Install Now Dinesh Thakur--Python Programming
  • 11. Step - 3 Installation in Process Dinesh Thakur--Python Programming
  • 12. Now, try to run python on the command prompt. Dinesh Thakur--Python Programming
  • 13. Python First Program Dinesh Thakur--Python Programming
  • 15. Python Keywords • Python Keywords are special reserved words that convey a special meaning to the compiler/interpreter. Each keyword has a special meaning and a specific operation. These keywords can't be used as a variable. Following is the List of Python Keywords. Dinesh Thakur--Python Programming
  • 16. Python Keywords True False None and as asset def class continue break else finally elif del except global for if from import raise try or return pass nonlocal in not is lambda Dinesh Thakur--Python Programming
  • 17. Python Identifiers Python identifiers refer to a name used to identify a variable, function, module, class, module or other objects. There are few rules to follow while naming the Python Variable. • A variable name must start with either an English letter or underscore (_). • A variable name cannot start with the number. • Special characters are not allowed in the variable name. • The variable's name is case sensitive. Dinesh Thakur--Python Programming
  • 18. Python Variables • Variable is a named storage location where we can store value and perform manipulation(calculation) on stored value during execution of a program. • Example: a = 50 Dinesh Thakur--Python Programming
  • 22. Python Data Types • Variables can hold values, and every value has a data-type. Python is a dynamically typed language; hence we do not need to define the type of the variable while declaring it. The interpreter implicitly(directly) binds the value with its type. • a=10 Dinesh Thakur--Python Programming
  • 23. Python Data Types Program Dinesh Thakur--Python Programming
  • 24. Python data types Dinesh Thakur--Python Programming
  • 25. Number Data Type Dinesh Thakur--Python Programming
  • 26. Boolean • Boolean type provides two built-in values, True and False. These values are used to determine the given statement true or false. It denotes by the class bool. True can be represented by any non-zero value or 'T' whereas false can be represented by the 0 or 'F'. Consider the following example. • # Python program to check the boolean type • print(type(True)) • print(type(False)) • print(false) Dinesh Thakur--Python Programming
  • 28. List Python Lists are similar to arrays in C. However, the list can contain data of different types. The items stored in the list are separated with a comma (,) and enclosed within square brackets []. Dinesh Thakur--Python Programming
  • 29. Tuple A tuple is similar to the list in many ways. Like lists, tuples also contain the collection of the items of different data types. The items of the tuple are separated with a comma (,) and enclosed in parentheses (). A tuple is a read-only data structure as we can't modify the size and value of the items of a tuple. Dinesh Thakur--Python Programming
  • 30. Dictionary Data Type • Dictionary is an unordered set of a key-value pair of items. It is like an associative array or a hash table where each key stores a specific value. Key can hold any primitive data type, whereas value is an arbitrary Python object. • The items in the dictionary are separated with the comma (,) and enclosed in the curly braces {}. Dinesh Thakur--Python Programming
  • 31. Dictionary Data Type Program Dinesh Thakur--Python Programming
  • 32. Set Data Type • Python Set is the unordered collection of the data type. It is iterable, mutable(can modify after creation), and has unique elements. In set, the order of the elements is undefined; it may return the changed sequence of the element. The set is created by using a built-in function set(), or a sequence of elements is passed in the curly braces and separated by the comma. It can contain various types of values. Dinesh Thakur--Python Programming
  • 34. Operators • Operator performs operation on operands or data. • Arithmetic operator : +,-,/,%,and * • E.g. 2+2 , 8*2 • Comparison Operator: <,>,=<,>=,!= • E.g. 7>2 , 2<9 • Assignment Operator: = , =* , =+ ,=- • 2+2=4 Dinesh Thakur--Python Programming
  • 35. Operators • Bitwise Operators : performs operation on binary digits only. >> ,<<,>>>,<<< • E.g >> Right Shift 2 digit • >>11111111-----00111111 Dinesh Thakur--Python Programming
  • 37. Membership Operators • Python membership operators are used to check the membership of value inside a Python data structure. If the value is present in the data structure, then the resulting value is true otherwise it returns false. • IN • Not IN Dinesh Thakur--Python Programming
  • 41. Comments • If we want to write additional information of program, we use comment. • # is used for comment Dinesh Thakur--Python Programming
  • 55. Python Popular Frameworks and Libraries • Python has wide range of libraries and frameworks widely used in various fields such as machine learning, artificial intelligence, web applications, etc. We define some popular frameworks and libraries of Python as follows. • Web development (Server-side) - Django Flask, Pyramid, CherryPy • GUIs based applications - Tk, PyGTK, PyQt, PyJs, etc. • Machine Learning - TensorFlow, PyTorch, Scikit-learn, Matplotlib, Scipy, etc. • Mathematics - Numpy, Pandas, etc. Dinesh Thakur--Python Programming