SlideShare ist ein Scribd-Unternehmen logo
1 von 26
What is Python ?
Python is a simple, easy to learn, powerful, high level and object-
oriented programming language.
Python is an interpreted scripting language also. Guido Van Rossum
is known as the founder of python programming.
Introduction to Python
It covers the topics such as python programming, features, history,
versions, how to install, example, how to execute, variables,
keywords, identifiers, literals, operators and comments.
Copied -Prof. Maulik Borsaniya
Control Statement
The control statement in python covers if
statement, for loop, while loop, do while loop,
break statement, continue statement and pass
statement.
Python Strings
The string chapter in python provides the full
functionality to work on strings such as accessing
string, applying string operators, details of slice
notation, applying different functions etc.
Copied -Prof. Maulik Borsaniya
Python Tuples
A sequence of immutable objects is known as tuple, it covers accessing
tuple, adding tuple, replicating tuple, updating tuple etc.
Python Dictionary
The python dictionary provides details about dictionary operations.
Python Functions
It provides a list of python functions with its implementations.
Python Files I/O
How to write data into file and read data from file in python?
Python Modules
What is python module? What are the usage of modules?
Python Exceptions
It explains the errors and exceptions in python.
Copied -Prof. Maulik Borsaniya
• Python Introduction
• Python is a general purpose, dynamic, high level and interpreted
programming language. It supports Object Oriented programming
approach to develop applications. It is simple and easy to learn
and provides lots of high-level data structures.
• Python is easy to learn yet powerful and versatile scripting
language which makes it attractive for Application Development.
• Python's syntax and dynamic typing with its interpreted nature,
makes it an ideal language for scripting and rapid application
development.
• Python supports multiple programming pattern, including object
oriented, imperative and functional or procedural programming
styles.
Copied -Prof. Maulik Borsaniya
Python is not intended to work on special area such as
web programming. That is why it is known
as multipurpose because it can be used with web,
enterprise, 3D CAD etc.
We don't need to use data types to declare variable
because it is dynamically typed so we can write a=10 to
assign an integer value in an integer variable.
Python makes the development and
debugging fast because there is no compilation step
included in python development and edit-test-debug
cycle is very fast.
Copied -Prof. Maulik Borsaniya
Python Features
1) Easy to Learn and Use
Python is easy to learn and use. It is developer-friendly and high level programming
language.
2) Expressive Language
Python language is more expressive means that it is more understandable and readable.
3) Interpreted Language
Python is an interpreted language i.e. interpreter executes the code line by line at a time.
This makes debugging easy and thus suitable for beginners.
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.
5) Free and Open Source
Python language is freely available at offical web address.The source-code is also available.
Therefore it is open source.
Copied -Prof. Maulik Borsaniya
6) Object-Oriented Language
Python supports object oriented language and concepts of classes
and objects come into existence.
7)Extensible
It implies that other languages such as C/C++ can be used to compile
the code and thus it can be used further in our python code.
8) Large Standard Library
Python has a large and broad library and provides rich set of module
and functions for rapid application development.
9) GUI Programming Support
Graphical user interfaces can be developed using Python.
10) Integrated
It can be easily integrated with languages like C, C++, JAVA etc.Copied -Prof. Maulik Borsaniya
Python History
Python laid its foundation in the late 1980s.
The implementation of Python was started in the December 1989 by Guido Van
Rossum at CWI in Netherland.
In February 1991, van Rossum published the code (labeled version 0.9.0) to
alt.sources.
In 1994, Python 1.0 was released with new features like: lambda, map, filter, and
reduce.
Python 2.0 added new features like: list comprehensions, garbage collection
system.
On December 3, 2008, Python 3.0 (also called "Py3K") was released. It was
designed to rectify fundamental flaw of the language.
ABC programming language is said to be the predecessor of Python language
which was capable of Exception Handling and interfacing with Amoeba OperatingCopied -Prof. Maulik Borsaniya
Python Version
Copied -Prof. Maulik Borsaniya
Copied -Prof. Maulik Borsaniya
Python Application Area
1) Web Applications
2) Desktop GUI Applications
3) Software Development
4) Scientific and Numeric
5) Business Applications
6) Console Based Application
7) Audio or Video based Applications
8) 3D CAD Applications
9) Enterprise Applications
10) Applications for Images
Copied -Prof. Maulik Borsaniya
Simple Demo Program
• print("hello world by python!")
Execute this example by using following
command.
Python hello.py
• OR
>>> a="Welcome To Python"
>>> print a
Welcome To Python
Copied -Prof. Maulik Borsaniya
S
Simple Variable
Declaration
Copied -Prof. Maulik Borsaniya
Variable Declaration
x=5……………..(1)
X=y=z=50…………….(2)
a,b,c=5,10,15……………..(3)
Copied -Prof. Maulik Borsaniya
Tokens
• Tokens can be defined as a punctuator mark,
reserved words and each individual word in a
statement.
• Token is the smallest unit inside the given
program.
• There are following tokens in Python:
• Keywords.
• Identifiers.
• Literals.
• Operators.
Copied -Prof. Maulik Borsaniya
Tuples
Tuple is another form of collection where different type
of data can be stored.
It is similar to list where data is separated by commas.
Only the difference is that list uses square bracket and
tuple uses parenthesis.
Tuples are enclosed in parenthesis and cannot be
changed.
Copied -Prof. Maulik Borsaniya
>>> tuple=('rahul',100,60.4,'deepak')
>>> tuple1=('sanjay',10)
>>> tuple ('rahul', 100, 60.4, 'deepak')
>>> tuple[2:] (60.4, 'deepak')
>>> tuple1[0] 'sanjay'
>>> tuple+tuple1 ('rahul', 100, 60.4, 'deepak', 'sanjay', 10)
Copied -Prof. Maulik Borsaniya
Dictionary
Dictionary is a collection which works on a key-value pair.
It works like an associated array where no two keys can be same.
Dictionaries are enclosed by curly braces ({}) and values can be
retrieved by square bracket([]).
>>> dictionary={'name':'charlie','id':100,'dept':'it'}
>>> dictionary {'dept': 'it', 'name': 'charlie', 'id': 100}
>>> dictionary.keys()
['dept', 'name', 'id']
>>> dictionary.values()
['it', 'charlie', 100]
Copied -Prof. Maulik Borsaniya
Python Keywords
Copied -Prof. Maulik Borsaniya
List
List contain items of different data types. Lists are mutable i.e.,
modifiable.
The values stored in List are separated by commas(,) and enclosed
within a square brackets([]). We can store different type of data in a
List.
Value stored in a List can be retrieved using the slice operator([] and
[:]).
The plus sign (+) is the list concatenation and asterisk(*) is the
repetition operator.
Copied -Prof. Maulik Borsaniya
>>> list=[‘Maulik',678,20.4,‘Ravi']
>>> list1=[456,‘Kalpesh']
list ['aman', 678, 20.4, 'saurav
>>> list+list1
Copied -Prof. Maulik Borsaniya
Operator
Operators are particular symbols that are used to perform operations on
operands. It returns result that can be used in application.
Arithmetic Operators.
Relational Operators.
Assignment Operators.
Logical Operators.
Membership Operators.
Identity Operators.
Bitwise Operators.
Copied -Prof. Maulik Borsaniya
Copied -Prof. Maulik Borsaniya
Copied -Prof. Maulik Borsaniya
Conditional Statement
Copied -Prof. Maulik Borsaniya
year=2000
if year%4==0:
print "Year is Leap"
else:
print "Year is not Leap"
Copied -Prof. Maulik Borsaniya

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
 
Programming
ProgrammingProgramming
Programming
 
Python Tutorial Part 1
Python Tutorial Part 1Python Tutorial Part 1
Python Tutorial Part 1
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
 
Python Presentation
Python PresentationPython Presentation
Python Presentation
 
Python final ppt
Python final pptPython final ppt
Python final ppt
 
Data visualization in Python
Data visualization in PythonData visualization in Python
Data visualization in Python
 
Python 3 Programming Language
Python 3 Programming LanguagePython 3 Programming Language
Python 3 Programming Language
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02Basic Python Programming: Part 01 and Part 02
Basic Python Programming: Part 01 and Part 02
 
Python
PythonPython
Python
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 
Introduction to the Python
Introduction to the PythonIntroduction to the Python
Introduction to the Python
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python ppt
 
Python exception handling
Python   exception handlingPython   exception handling
Python exception handling
 
Basic Concepts in Python
Basic Concepts in PythonBasic Concepts in Python
Basic Concepts in Python
 
Python basics
Python basicsPython basics
Python basics
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
 

Ähnlich wie Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA

Government Polytechnic Arvi-1.pptx
Government Polytechnic Arvi-1.pptxGovernment Polytechnic Arvi-1.pptx
Government Polytechnic Arvi-1.pptxShivamDenge
 
summer training report on python
summer training report on pythonsummer training report on python
summer training report on pythonShubham Yadav
 
Introduction to Python.pptx
Introduction to Python.pptxIntroduction to Python.pptx
Introduction to Python.pptxSamyakJain461
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data sciencebhavesh lande
 
Top Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfTop Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfDatacademy.ai
 
Python-Mastering-the-Language-of-Data-Science.pptx
Python-Mastering-the-Language-of-Data-Science.pptxPython-Mastering-the-Language-of-Data-Science.pptx
Python-Mastering-the-Language-of-Data-Science.pptxdmdHaneef
 
python project jarvis ppt.pptx
python project jarvis ppt.pptxpython project jarvis ppt.pptx
python project jarvis ppt.pptxVikashKumarMehta5
 
Python Training in Mohali
Python Training in MohaliPython Training in Mohali
Python Training in Mohaliexcellence0
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)guobichrng
 

Ähnlich wie Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA (20)

Government Polytechnic Arvi-1.pptx
Government Polytechnic Arvi-1.pptxGovernment Polytechnic Arvi-1.pptx
Government Polytechnic Arvi-1.pptx
 
Shivam PPT.pptx
Shivam PPT.pptxShivam PPT.pptx
Shivam PPT.pptx
 
summer training report on python
summer training report on pythonsummer training report on python
summer training report on python
 
Report om 3
Report om 3Report om 3
Report om 3
 
Introduction to Python.pptx
Introduction to Python.pptxIntroduction to Python.pptx
Introduction to Python.pptx
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
 
Python programming
Python programmingPython programming
Python programming
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data science
 
Top Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfTop Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdf
 
Python-Mastering-the-Language-of-Data-Science.pptx
Python-Mastering-the-Language-of-Data-Science.pptxPython-Mastering-the-Language-of-Data-Science.pptx
Python-Mastering-the-Language-of-Data-Science.pptx
 
python project jarvis ppt.pptx
python project jarvis ppt.pptxpython project jarvis ppt.pptx
python project jarvis ppt.pptx
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
Python Training in Mohali
Python Training in MohaliPython Training in Mohali
Python Training in Mohali
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
Python Class 1
Python Class 1Python Class 1
Python Class 1
 
Python basics
Python basicsPython basics
Python basics
 
Python
PythonPython
Python
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 

Mehr von Maulik Borsaniya

Dragon fruit-nutrition-facts
Dragon fruit-nutrition-factsDragon fruit-nutrition-facts
Dragon fruit-nutrition-factsMaulik Borsaniya
 
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYAChapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYAMaulik Borsaniya
 
PYTHON -Chapter 5 NETWORK - MAULIK BORSANIYA
PYTHON -Chapter 5 NETWORK - MAULIK BORSANIYAPYTHON -Chapter 5 NETWORK - MAULIK BORSANIYA
PYTHON -Chapter 5 NETWORK - MAULIK BORSANIYAMaulik Borsaniya
 
PYTHON - EXTRA Chapter GUI - MAULIK BORSANIYA
PYTHON - EXTRA Chapter GUI - MAULIK BORSANIYAPYTHON - EXTRA Chapter GUI - MAULIK BORSANIYA
PYTHON - EXTRA Chapter GUI - MAULIK BORSANIYAMaulik Borsaniya
 
PYTHON-Chapter 4-Plotting and Data Science PyLab - MAULIK BORSANIYA
PYTHON-Chapter 4-Plotting and Data Science  PyLab - MAULIK BORSANIYAPYTHON-Chapter 4-Plotting and Data Science  PyLab - MAULIK BORSANIYA
PYTHON-Chapter 4-Plotting and Data Science PyLab - MAULIK BORSANIYAMaulik Borsaniya
 
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYAPYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYAMaulik Borsaniya
 
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...Maulik Borsaniya
 

Mehr von Maulik Borsaniya (7)

Dragon fruit-nutrition-facts
Dragon fruit-nutrition-factsDragon fruit-nutrition-facts
Dragon fruit-nutrition-facts
 
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYAChapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
Chapter 5 - THREADING & REGULAR exp - MAULIK BORSANIYA
 
PYTHON -Chapter 5 NETWORK - MAULIK BORSANIYA
PYTHON -Chapter 5 NETWORK - MAULIK BORSANIYAPYTHON -Chapter 5 NETWORK - MAULIK BORSANIYA
PYTHON -Chapter 5 NETWORK - MAULIK BORSANIYA
 
PYTHON - EXTRA Chapter GUI - MAULIK BORSANIYA
PYTHON - EXTRA Chapter GUI - MAULIK BORSANIYAPYTHON - EXTRA Chapter GUI - MAULIK BORSANIYA
PYTHON - EXTRA Chapter GUI - MAULIK BORSANIYA
 
PYTHON-Chapter 4-Plotting and Data Science PyLab - MAULIK BORSANIYA
PYTHON-Chapter 4-Plotting and Data Science  PyLab - MAULIK BORSANIYAPYTHON-Chapter 4-Plotting and Data Science  PyLab - MAULIK BORSANIYA
PYTHON-Chapter 4-Plotting and Data Science PyLab - MAULIK BORSANIYA
 
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYAPYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
PYTHON-Chapter 3-Classes and Object-oriented Programming: MAULIK BORSANIYA
 
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...PYTHON -Chapter 2 - Functions,   Exception, Modules  and    Files -MAULIK BOR...
PYTHON -Chapter 2 - Functions, Exception, Modules and Files -MAULIK BOR...
 

Kürzlich hochgeladen

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Kürzlich hochgeladen (20)

Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA

  • 1. What is Python ? Python is a simple, easy to learn, powerful, high level and object- oriented programming language. Python is an interpreted scripting language also. Guido Van Rossum is known as the founder of python programming. Introduction to Python It covers the topics such as python programming, features, history, versions, how to install, example, how to execute, variables, keywords, identifiers, literals, operators and comments. Copied -Prof. Maulik Borsaniya
  • 2. Control Statement The control statement in python covers if statement, for loop, while loop, do while loop, break statement, continue statement and pass statement. Python Strings The string chapter in python provides the full functionality to work on strings such as accessing string, applying string operators, details of slice notation, applying different functions etc. Copied -Prof. Maulik Borsaniya
  • 3. Python Tuples A sequence of immutable objects is known as tuple, it covers accessing tuple, adding tuple, replicating tuple, updating tuple etc. Python Dictionary The python dictionary provides details about dictionary operations. Python Functions It provides a list of python functions with its implementations. Python Files I/O How to write data into file and read data from file in python? Python Modules What is python module? What are the usage of modules? Python Exceptions It explains the errors and exceptions in python. Copied -Prof. Maulik Borsaniya
  • 4. • Python Introduction • Python is a general purpose, dynamic, high level and interpreted programming language. It supports Object Oriented programming approach to develop applications. It is simple and easy to learn and provides lots of high-level data structures. • Python is easy to learn yet powerful and versatile scripting language which makes it attractive for Application Development. • Python's syntax and dynamic typing with its interpreted nature, makes it an ideal language for scripting and rapid application development. • Python supports multiple programming pattern, including object oriented, imperative and functional or procedural programming styles. Copied -Prof. Maulik Borsaniya
  • 5. Python is not intended to work on special area such as web programming. That is why it is known as multipurpose because it can be used with web, enterprise, 3D CAD etc. We don't need to use data types to declare variable because it is dynamically typed so we can write a=10 to assign an integer value in an integer variable. Python makes the development and debugging fast because there is no compilation step included in python development and edit-test-debug cycle is very fast. Copied -Prof. Maulik Borsaniya
  • 6. Python Features 1) Easy to Learn and Use Python is easy to learn and use. It is developer-friendly and high level programming language. 2) Expressive Language Python language is more expressive means that it is more understandable and readable. 3) Interpreted Language Python is an interpreted language i.e. interpreter executes the code line by line at a time. This makes debugging easy and thus suitable for beginners. 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. 5) Free and Open Source Python language is freely available at offical web address.The source-code is also available. Therefore it is open source. Copied -Prof. Maulik Borsaniya
  • 7. 6) Object-Oriented Language Python supports object oriented language and concepts of classes and objects come into existence. 7)Extensible It implies that other languages such as C/C++ can be used to compile the code and thus it can be used further in our python code. 8) Large Standard Library Python has a large and broad library and provides rich set of module and functions for rapid application development. 9) GUI Programming Support Graphical user interfaces can be developed using Python. 10) Integrated It can be easily integrated with languages like C, C++, JAVA etc.Copied -Prof. Maulik Borsaniya
  • 8. Python History Python laid its foundation in the late 1980s. The implementation of Python was started in the December 1989 by Guido Van Rossum at CWI in Netherland. In February 1991, van Rossum published the code (labeled version 0.9.0) to alt.sources. In 1994, Python 1.0 was released with new features like: lambda, map, filter, and reduce. Python 2.0 added new features like: list comprehensions, garbage collection system. On December 3, 2008, Python 3.0 (also called "Py3K") was released. It was designed to rectify fundamental flaw of the language. ABC programming language is said to be the predecessor of Python language which was capable of Exception Handling and interfacing with Amoeba OperatingCopied -Prof. Maulik Borsaniya
  • 9. Python Version Copied -Prof. Maulik Borsaniya
  • 10. Copied -Prof. Maulik Borsaniya
  • 11. Python Application Area 1) Web Applications 2) Desktop GUI Applications 3) Software Development 4) Scientific and Numeric 5) Business Applications 6) Console Based Application 7) Audio or Video based Applications 8) 3D CAD Applications 9) Enterprise Applications 10) Applications for Images Copied -Prof. Maulik Borsaniya
  • 12. Simple Demo Program • print("hello world by python!") Execute this example by using following command. Python hello.py • OR >>> a="Welcome To Python" >>> print a Welcome To Python Copied -Prof. Maulik Borsaniya
  • 15. Tokens • Tokens can be defined as a punctuator mark, reserved words and each individual word in a statement. • Token is the smallest unit inside the given program. • There are following tokens in Python: • Keywords. • Identifiers. • Literals. • Operators. Copied -Prof. Maulik Borsaniya
  • 16. Tuples Tuple is another form of collection where different type of data can be stored. It is similar to list where data is separated by commas. Only the difference is that list uses square bracket and tuple uses parenthesis. Tuples are enclosed in parenthesis and cannot be changed. Copied -Prof. Maulik Borsaniya
  • 17. >>> tuple=('rahul',100,60.4,'deepak') >>> tuple1=('sanjay',10) >>> tuple ('rahul', 100, 60.4, 'deepak') >>> tuple[2:] (60.4, 'deepak') >>> tuple1[0] 'sanjay' >>> tuple+tuple1 ('rahul', 100, 60.4, 'deepak', 'sanjay', 10) Copied -Prof. Maulik Borsaniya
  • 18. Dictionary Dictionary is a collection which works on a key-value pair. It works like an associated array where no two keys can be same. Dictionaries are enclosed by curly braces ({}) and values can be retrieved by square bracket([]). >>> dictionary={'name':'charlie','id':100,'dept':'it'} >>> dictionary {'dept': 'it', 'name': 'charlie', 'id': 100} >>> dictionary.keys() ['dept', 'name', 'id'] >>> dictionary.values() ['it', 'charlie', 100] Copied -Prof. Maulik Borsaniya
  • 19. Python Keywords Copied -Prof. Maulik Borsaniya
  • 20. List List contain items of different data types. Lists are mutable i.e., modifiable. The values stored in List are separated by commas(,) and enclosed within a square brackets([]). We can store different type of data in a List. Value stored in a List can be retrieved using the slice operator([] and [:]). The plus sign (+) is the list concatenation and asterisk(*) is the repetition operator. Copied -Prof. Maulik Borsaniya
  • 21. >>> list=[‘Maulik',678,20.4,‘Ravi'] >>> list1=[456,‘Kalpesh'] list ['aman', 678, 20.4, 'saurav >>> list+list1 Copied -Prof. Maulik Borsaniya
  • 22. Operator Operators are particular symbols that are used to perform operations on operands. It returns result that can be used in application. Arithmetic Operators. Relational Operators. Assignment Operators. Logical Operators. Membership Operators. Identity Operators. Bitwise Operators. Copied -Prof. Maulik Borsaniya
  • 23. Copied -Prof. Maulik Borsaniya
  • 24. Copied -Prof. Maulik Borsaniya
  • 26. year=2000 if year%4==0: print "Year is Leap" else: print "Year is not Leap" Copied -Prof. Maulik Borsaniya