SlideShare a Scribd company logo
PYTHON
SUMAN CHANDRA
MCA-5
WHY NAME PYTHON?
 Developed by Van Rossum and named as python to honor British comedy group
Monty python.
Idle was also chosen to honor Eric idle. Monty pythons founding member
WHY PYTHON?
 Faster growing language in terms of:
 Number Of developers who are using it.
 Numbers of library we use.
 Area you can implement it.
 Machine learning , GUI , S/w development , web development , IOT.
 Beginner friendly.
WHY PYTHON?
INTRODUCTION
 Python is easy to learn and use. It is developer-friendly and high level
programming language.
 Python language is more expressive means that it is more understandable and
readable.
Python is compiled and interpreted.
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.
INTRODUCTION
 Python language is freely available at official web address. The source-code is
also available. Therefore it is open source.
Python has a large and broad library and provides rich set of module and
functions for rapid application development.
It can be easily integrated with languages like C, C++, JAVA etc.
 python have different implementation: PYPY ,CPYTHON ( c ) , IRONPYTHON
(.net), JYTHON (java)
INTRODUCTION
• Python supports multiple programming paradigm
• Functional programming
• Structured programming
• Object oriented programming
• Aspect oriented programming
INSTALLATION
To download and install Python visit the official
website of Python and choose your version.
http://www.python.org/downloads/
Once the download is complete, run the exe
for install Python. Now click on Install Now.
To download and install pycharm (IDE) visit
the official website of jetbrains and choose
your version.
https://www.jetbrains.com/pycharm/download/
PYTHON DATA TYPES
 Integers
There is effectively no limit to how long an integer value can be. Of course, it is
constrained by the amount of memory your system has.
>> print(10)
10
>> x=10
>> Print(x)
10
INTEGER(BINARY , OCTAL , HEXADECIMAL)
Prefix Interpretation Base
0b (zero + lowercase letter 'b')
0B (zero + uppercase letter 'B')
Binary 2
0o (zero + lowercase letter 'o')
0O (zero + uppercase letter 'O')
Octal 8
0x (zero + lowercase letter 'x')
0X (zero + uppercase letter 'X')
Hexadecimal 16
FLOATING POINT NUMBERS
The float type in Python designates a floating-point number. float values are
specified with a decimal point. Optionally, the character e or E followed by a
positive or negative integer may be appended to specify scientific notation:
>>> 4.2
4.2
>>> type(4.2)
<class 'float'>
>>> .4e7
4000000.0
>>> 4.2e-4
0.00042
COMPLEX NUMBERS
Complex numbers are specified as <real part> + <imaginary part> j.
>>> 2+3j
(2+3j)
>>> type(2+3j)
<class 'complex'>
STRING
• Strings are sequences of character data. The string type in Python is called str.
• String literals may be delimited using either single or double quotes. All the
characters between the opening delimiter and matching closing delimiter are part
of the string:
>>> print("I am a string.")
I am a string.
>>> type("I am a string.")
<class 'str‘
>>> print('I am too.')
I am too.
>>> type('I am too.')
<class 'str'>
VARIABLE
• A variable can be seen as a container to store certain values. While the program
is running, variables are accessed and sometimes changed, i.e. a new value will
be assigned to the variable.
• In Java or C, every variable has to be declared before it can be used. Declaring a
variable means binding it to a data type.
• Declaration of variables is not required in Python. If there is need of a variable,
you think of a name and start using it as a variable.
• Another remarkable aspect of Python: Not only the value of a variable may
change during program execution but the type as well.
VARIABLE
i = 42
>>> i = i + 1
>>> print i
43
>>>i = 42 # data type is implicitly set to integer
>>>i = 42 + 0.11 # data type is changed to float
>>>i = "forty" # and now it will be a string
PYTHON OPERATORS
• Python Arithmetic Operators :Arithmetic operators are used with numeric values to
perform common mathematical operations.
• Python Assignment Operators :Assignment operators are used to assign values to
variables.
• Python Comparison Operators :Comparison operators are used to compare two values.
• Python Logical Operators : Logical operators are used to combine conditional
statements.
• Python Identity Operators : Identity operators are used to compare the objects, not if
they are equal, but if they are actually the same object, with the same memory location.
• Python Membership Operators : Membership operators are used to test if a sequence is
presented in an object.
ARITHMETIC OPERATORS
OPERATOR NAME EXAMPLE
+ Addition x + y
- Subtraction x - y
* Multiplication x * y
/ Division x / y
% Modulus x % y
** Exponentiation x ** y
// Floor division x // y
ASSIGNMENT OPERATORS
OPERATOR EXAMPLE SAME AS
= x = 5 x = 5
+= x += 3 x = x + 3
-= x -= 3 x = x - 3
*= x *= 3 x = x * 3
/= x /= 3 x = x / 3
%= x %= 3 x = x % 3
//= x //= 3 x = x // 3
**= x **= 3 x = x ** 3
&= x &= 3 x = x & 3
|= x |= 3 x = x | 3
^= x ^= 3 x = x ^ 3
COMPARISON OPERATORS
Operator Name Example
== Equal x == y
!= Not equal x != y
> Greater than x > y
< Less than x < y
>= Greater than or equal to x >= y
<= Less than or equal to x <= y
IDENTITY OPERATORS
Operator Description Example
is
Returns true if both
variables are the same
object
x is y
is not
Returns true if both
variables are not the
same object
x is not y
MEMBERSHIP OPERATORS
Operator Description Example
in
Returns True if a
sequence with the
specified value is
present in the object
x in y
not in
Returns True if a
sequence with the
specified value is not
present in the object
x not in y
ARRAY
Arrays are used to store multiple values in one single variable.
An array is a special variable, which can hold more than one value at a time.
>>> cars = ["Ford", "Volvo", "BMW"]
>>>print(cars)
['Ford', 'Volvo', 'BMW']
ACCESS THE ELEMENTS OF AN ARRAY
You refer to an array element by referring to the index number.
>>>x = cars[0]
>>>print(x)
Ford
# Modify the value of the first array item:
>>>cars = ["Ford", "Volvo", "BMW"]
>>>cars[0] = "Toyota"
>>>print(cars)
Toyota
THE LENGTH OF AN ARRAY
Use the len() method to return the length of an array (the number of elements in an
array).
>>>cars = ["Ford", "Volvo", "BMW"]
>>>x = len(cars)
>>>print(x)
3
ADDING ARRAY ELEMENTS
You can use the append() method to add an element to an array.
cars = ["Ford", "Volvo", "BMW"]
cars.append("Honda")
print(cars)
['Ford', 'Volvo', 'BMW', 'Honda']
REMOVING ARRAY ELEMENTS
You can use the pop() method to remove an element from the array.
cars = ["Ford", "Volvo", "BMW"]
cars.pop(1)
print(cars)
['Ford', 'BMW']
REMOVING ARRAY ELEMENTS
You can use the pop() method to remove an element from the array
You can also use the remove() method to remove an element from the array.
>>>cars = ["Ford", "Volvo", "BMW"]
>>>cars.pop(1)
>>>print(cars)
['Ford', 'BMW']
>>>cars.remove("BMW")
>>>print(cars)
['Ford‘]
ARRAY METHODS
Method Description
append() Adds an element at the end of the list
clear() Removes all the elements from the list
copy() Returns a copy of the list
count() Returns the number of elements with the specified value
extend()
Add the elements of a list (or any iterable), to the end of the
current list
index() Returns the index of the first element with the specified value
insert() Adds an element at the specified position
pop() Removes the element at the specified position
RECURSION
• In Python, a function is recursive if it calls itself and has a termination condition.?
• Why a termination condition?
• Limitations of recursions:
• Every time a function calls itself and stores some memory. Thus, a recursive
function could hold much more memory than a traditional function. Python stops
the function calls after a depth of 1000 calls.
SOME AMAZING FACTS
• Van Rossum worked for google and dropbox.
• Real life application:
• NETFLIX (75%) , FACEBOOK , AMAZON , YouTube
• Google , Firefox , NASA , IBM , Walt Disney , Drop Box
• Google trends [ oct 6 , 2013 – sep 20 , 2018]
•
PYTHON
JAVA
C
C++
Thank You!

More Related Content

What's hot

Python programming
Python  programmingPython  programming
Python programming
Ashwin Kumar Ramasamy
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
KrishnaMildain
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Agung Wahyudi
 
Python Intro
Python IntroPython Intro
Python Intro
Tim Penhey
 
Python
PythonPython
Python
SHIVAM VERMA
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
St. Petersburg College
 
Python basics
Python basicsPython basics
Python basics
Jyoti shukla
 
Advantages of Python Learning | Why Python
Advantages of Python Learning | Why PythonAdvantages of Python Learning | Why Python
Advantages of Python Learning | Why Python
EvoletTechnologiesCo
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
Paige Bailey
 
Class, object and inheritance in python
Class, object and inheritance in pythonClass, object and inheritance in python
Class, object and inheritance in python
Santosh Verma
 
Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...
Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...
Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...
Edureka!
 
Python
PythonPython
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
Aakashdata
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Edureka!
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
 
Introduction To Python | Edureka
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | Edureka
Edureka!
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
Swarit Wadhe
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Edureka!
 
PYthon
PYthonPYthon
Get started python programming part 1
Get started python programming   part 1Get started python programming   part 1
Get started python programming part 1
Nicholas I
 

What's hot (20)

Python programming
Python  programmingPython  programming
Python programming
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python Intro
Python IntroPython Intro
Python Intro
 
Python
PythonPython
Python
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
 
Python basics
Python basicsPython basics
Python basics
 
Advantages of Python Learning | Why Python
Advantages of Python Learning | Why PythonAdvantages of Python Learning | Why Python
Advantages of Python Learning | Why Python
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
 
Class, object and inheritance in python
Class, object and inheritance in pythonClass, object and inheritance in python
Class, object and inheritance in python
 
Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...
Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...
Python Sequence | Python Lists | Python Sets & Dictionary | Python Strings | ...
 
Python
PythonPython
Python
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
 
Introduction To Python | Edureka
Introduction To Python | EdurekaIntroduction To Python | Edureka
Introduction To Python | Edureka
 
Python - An Introduction
Python - An IntroductionPython - An Introduction
Python - An Introduction
 
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
 
PYthon
PYthonPYthon
PYthon
 
Get started python programming part 1
Get started python programming   part 1Get started python programming   part 1
Get started python programming part 1
 

Similar to Python

modul-python-all.pptx
modul-python-all.pptxmodul-python-all.pptx
modul-python-all.pptx
Yusuf Ayuba
 
Python basics
Python basicsPython basics
Python basics
Manisha Gholve
 
Python Basics by Akanksha Bali
Python Basics by Akanksha BaliPython Basics by Akanksha Bali
Python Basics by Akanksha Bali
Akanksha Bali
 
Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.
supriyasarkar38
 
An overview on python commands for solving the problems
An overview on python commands for solving the problemsAn overview on python commands for solving the problems
An overview on python commands for solving the problems
Ravikiran708913
 
Welcome to python workshop
Welcome to python workshopWelcome to python workshop
Welcome to python workshop
Mukul Kirti Verma
 
Python.pptx
Python.pptxPython.pptx
Python.pptx
Ankita Shirke
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
IruolagbePius
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
natnaelmamuye
 
Python
PythonPython
Python
Aashish Jain
 
Introduction to Python
Introduction to Python  Introduction to Python
Introduction to Python
Mohammed Sikander
 
1_Python Basics.pdf
1_Python Basics.pdf1_Python Basics.pdf
1_Python Basics.pdf
MaheshGour5
 
TOPIC-2-Expression Variable Assignment Statement.pdf
TOPIC-2-Expression Variable Assignment Statement.pdfTOPIC-2-Expression Variable Assignment Statement.pdf
TOPIC-2-Expression Variable Assignment Statement.pdf
EjazAlam23
 
PPt Revision of the basics of python1.pptx
PPt Revision of the basics of python1.pptxPPt Revision of the basics of python1.pptx
PPt Revision of the basics of python1.pptx
tcsonline1222
 
Python introduction towards data science
Python introduction towards data sciencePython introduction towards data science
Python introduction towards data science
deepak teja
 
Python For Data Science.pptx
Python For Data Science.pptxPython For Data Science.pptx
Python For Data Science.pptx
rohithprabhas1
 
Python_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. txPython_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. tx
vishwanathgoudapatil1
 
Python PPT by Sushil Sir.pptx
Python PPT by Sushil Sir.pptxPython PPT by Sushil Sir.pptx
Python PPT by Sushil Sir.pptx
sushil155005
 
01-Python-Basics.ppt
01-Python-Basics.ppt01-Python-Basics.ppt
01-Python-Basics.ppt
VicVic56
 
Python for Beginners(v1)
Python for Beginners(v1)Python for Beginners(v1)
Python for Beginners(v1)
Panimalar Engineering College
 

Similar to Python (20)

modul-python-all.pptx
modul-python-all.pptxmodul-python-all.pptx
modul-python-all.pptx
 
Python basics
Python basicsPython basics
Python basics
 
Python Basics by Akanksha Bali
Python Basics by Akanksha BaliPython Basics by Akanksha Bali
Python Basics by Akanksha Bali
 
Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.Basic concept of Python.pptx includes design tool, identifier, variables.
Basic concept of Python.pptx includes design tool, identifier, variables.
 
An overview on python commands for solving the problems
An overview on python commands for solving the problemsAn overview on python commands for solving the problems
An overview on python commands for solving the problems
 
Welcome to python workshop
Welcome to python workshopWelcome to python workshop
Welcome to python workshop
 
Python.pptx
Python.pptxPython.pptx
Python.pptx
 
Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
 
Python fundamentals
Python fundamentalsPython fundamentals
Python fundamentals
 
Python
PythonPython
Python
 
Introduction to Python
Introduction to Python  Introduction to Python
Introduction to Python
 
1_Python Basics.pdf
1_Python Basics.pdf1_Python Basics.pdf
1_Python Basics.pdf
 
TOPIC-2-Expression Variable Assignment Statement.pdf
TOPIC-2-Expression Variable Assignment Statement.pdfTOPIC-2-Expression Variable Assignment Statement.pdf
TOPIC-2-Expression Variable Assignment Statement.pdf
 
PPt Revision of the basics of python1.pptx
PPt Revision of the basics of python1.pptxPPt Revision of the basics of python1.pptx
PPt Revision of the basics of python1.pptx
 
Python introduction towards data science
Python introduction towards data sciencePython introduction towards data science
Python introduction towards data science
 
Python For Data Science.pptx
Python For Data Science.pptxPython For Data Science.pptx
Python For Data Science.pptx
 
Python_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. txPython_Haegl.powerpoint presentation. tx
Python_Haegl.powerpoint presentation. tx
 
Python PPT by Sushil Sir.pptx
Python PPT by Sushil Sir.pptxPython PPT by Sushil Sir.pptx
Python PPT by Sushil Sir.pptx
 
01-Python-Basics.ppt
01-Python-Basics.ppt01-Python-Basics.ppt
01-Python-Basics.ppt
 
Python for Beginners(v1)
Python for Beginners(v1)Python for Beginners(v1)
Python for Beginners(v1)
 

Recently uploaded

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 

Python

  • 2. WHY NAME PYTHON?  Developed by Van Rossum and named as python to honor British comedy group Monty python. Idle was also chosen to honor Eric idle. Monty pythons founding member
  • 3. WHY PYTHON?  Faster growing language in terms of:  Number Of developers who are using it.  Numbers of library we use.  Area you can implement it.  Machine learning , GUI , S/w development , web development , IOT.  Beginner friendly.
  • 5. INTRODUCTION  Python is easy to learn and use. It is developer-friendly and high level programming language.  Python language is more expressive means that it is more understandable and readable. Python is compiled and interpreted. 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.
  • 6. INTRODUCTION  Python language is freely available at official web address. The source-code is also available. Therefore it is open source. Python has a large and broad library and provides rich set of module and functions for rapid application development. It can be easily integrated with languages like C, C++, JAVA etc.  python have different implementation: PYPY ,CPYTHON ( c ) , IRONPYTHON (.net), JYTHON (java)
  • 7. INTRODUCTION • Python supports multiple programming paradigm • Functional programming • Structured programming • Object oriented programming • Aspect oriented programming
  • 8. INSTALLATION To download and install Python visit the official website of Python and choose your version. http://www.python.org/downloads/ Once the download is complete, run the exe for install Python. Now click on Install Now. To download and install pycharm (IDE) visit the official website of jetbrains and choose your version. https://www.jetbrains.com/pycharm/download/
  • 9. PYTHON DATA TYPES  Integers There is effectively no limit to how long an integer value can be. Of course, it is constrained by the amount of memory your system has. >> print(10) 10 >> x=10 >> Print(x) 10
  • 10. INTEGER(BINARY , OCTAL , HEXADECIMAL) Prefix Interpretation Base 0b (zero + lowercase letter 'b') 0B (zero + uppercase letter 'B') Binary 2 0o (zero + lowercase letter 'o') 0O (zero + uppercase letter 'O') Octal 8 0x (zero + lowercase letter 'x') 0X (zero + uppercase letter 'X') Hexadecimal 16
  • 11. FLOATING POINT NUMBERS The float type in Python designates a floating-point number. float values are specified with a decimal point. Optionally, the character e or E followed by a positive or negative integer may be appended to specify scientific notation: >>> 4.2 4.2 >>> type(4.2) <class 'float'> >>> .4e7 4000000.0 >>> 4.2e-4 0.00042
  • 12. COMPLEX NUMBERS Complex numbers are specified as <real part> + <imaginary part> j. >>> 2+3j (2+3j) >>> type(2+3j) <class 'complex'>
  • 13. STRING • Strings are sequences of character data. The string type in Python is called str. • String literals may be delimited using either single or double quotes. All the characters between the opening delimiter and matching closing delimiter are part of the string: >>> print("I am a string.") I am a string. >>> type("I am a string.") <class 'str‘ >>> print('I am too.') I am too. >>> type('I am too.') <class 'str'>
  • 14. VARIABLE • A variable can be seen as a container to store certain values. While the program is running, variables are accessed and sometimes changed, i.e. a new value will be assigned to the variable. • In Java or C, every variable has to be declared before it can be used. Declaring a variable means binding it to a data type. • Declaration of variables is not required in Python. If there is need of a variable, you think of a name and start using it as a variable. • Another remarkable aspect of Python: Not only the value of a variable may change during program execution but the type as well.
  • 15. VARIABLE i = 42 >>> i = i + 1 >>> print i 43 >>>i = 42 # data type is implicitly set to integer >>>i = 42 + 0.11 # data type is changed to float >>>i = "forty" # and now it will be a string
  • 16. PYTHON OPERATORS • Python Arithmetic Operators :Arithmetic operators are used with numeric values to perform common mathematical operations. • Python Assignment Operators :Assignment operators are used to assign values to variables. • Python Comparison Operators :Comparison operators are used to compare two values. • Python Logical Operators : Logical operators are used to combine conditional statements. • Python Identity Operators : Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object, with the same memory location. • Python Membership Operators : Membership operators are used to test if a sequence is presented in an object.
  • 17. ARITHMETIC OPERATORS OPERATOR NAME EXAMPLE + Addition x + y - Subtraction x - y * Multiplication x * y / Division x / y % Modulus x % y ** Exponentiation x ** y // Floor division x // y
  • 18. ASSIGNMENT OPERATORS OPERATOR EXAMPLE SAME AS = x = 5 x = 5 += x += 3 x = x + 3 -= x -= 3 x = x - 3 *= x *= 3 x = x * 3 /= x /= 3 x = x / 3 %= x %= 3 x = x % 3 //= x //= 3 x = x // 3 **= x **= 3 x = x ** 3 &= x &= 3 x = x & 3 |= x |= 3 x = x | 3 ^= x ^= 3 x = x ^ 3
  • 19. COMPARISON OPERATORS Operator Name Example == Equal x == y != Not equal x != y > Greater than x > y < Less than x < y >= Greater than or equal to x >= y <= Less than or equal to x <= y
  • 20. IDENTITY OPERATORS Operator Description Example is Returns true if both variables are the same object x is y is not Returns true if both variables are not the same object x is not y
  • 21. MEMBERSHIP OPERATORS Operator Description Example in Returns True if a sequence with the specified value is present in the object x in y not in Returns True if a sequence with the specified value is not present in the object x not in y
  • 22. ARRAY Arrays are used to store multiple values in one single variable. An array is a special variable, which can hold more than one value at a time. >>> cars = ["Ford", "Volvo", "BMW"] >>>print(cars) ['Ford', 'Volvo', 'BMW']
  • 23. ACCESS THE ELEMENTS OF AN ARRAY You refer to an array element by referring to the index number. >>>x = cars[0] >>>print(x) Ford # Modify the value of the first array item: >>>cars = ["Ford", "Volvo", "BMW"] >>>cars[0] = "Toyota" >>>print(cars) Toyota
  • 24. THE LENGTH OF AN ARRAY Use the len() method to return the length of an array (the number of elements in an array). >>>cars = ["Ford", "Volvo", "BMW"] >>>x = len(cars) >>>print(x) 3
  • 25. ADDING ARRAY ELEMENTS You can use the append() method to add an element to an array. cars = ["Ford", "Volvo", "BMW"] cars.append("Honda") print(cars) ['Ford', 'Volvo', 'BMW', 'Honda']
  • 26. REMOVING ARRAY ELEMENTS You can use the pop() method to remove an element from the array. cars = ["Ford", "Volvo", "BMW"] cars.pop(1) print(cars) ['Ford', 'BMW']
  • 27. REMOVING ARRAY ELEMENTS You can use the pop() method to remove an element from the array You can also use the remove() method to remove an element from the array. >>>cars = ["Ford", "Volvo", "BMW"] >>>cars.pop(1) >>>print(cars) ['Ford', 'BMW'] >>>cars.remove("BMW") >>>print(cars) ['Ford‘]
  • 28. ARRAY METHODS Method Description append() Adds an element at the end of the list clear() Removes all the elements from the list copy() Returns a copy of the list count() Returns the number of elements with the specified value extend() Add the elements of a list (or any iterable), to the end of the current list index() Returns the index of the first element with the specified value insert() Adds an element at the specified position pop() Removes the element at the specified position
  • 29. RECURSION • In Python, a function is recursive if it calls itself and has a termination condition.? • Why a termination condition? • Limitations of recursions: • Every time a function calls itself and stores some memory. Thus, a recursive function could hold much more memory than a traditional function. Python stops the function calls after a depth of 1000 calls.
  • 30. SOME AMAZING FACTS • Van Rossum worked for google and dropbox. • Real life application: • NETFLIX (75%) , FACEBOOK , AMAZON , YouTube • Google , Firefox , NASA , IBM , Walt Disney , Drop Box • Google trends [ oct 6 , 2013 – sep 20 , 2018] • PYTHON JAVA C C++