SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Values and Data types in python
Values and Data types in pythonValues and Data types in python
Values and Data types in pythonJothi Thilaga P
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide shareDevashish Kumar
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming LanguageLaxman Puri
 
python conditional statement.pptx
python conditional statement.pptxpython conditional statement.pptx
python conditional statement.pptxDolchandra
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programmingSrinivas Narasegouda
 
Python-03| Data types
Python-03| Data typesPython-03| Data types
Python-03| Data typesMohd Sajjad
 
Python PPT
Python PPTPython PPT
Python PPTEdureka!
 
Looping Statements and Control Statements in Python
Looping Statements and Control Statements in PythonLooping Statements and Control Statements in Python
Looping Statements and Control Statements in PythonPriyankaC44
 
Functions in python
Functions in pythonFunctions in python
Functions in pythoncolorsof
 
Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python Jaganadh Gopinadhan
 
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 02Fariz Darari
 
Variables & Data Types In Python | Edureka
Variables & Data Types In Python | EdurekaVariables & Data Types In Python | Edureka
Variables & Data Types In Python | EdurekaEdureka!
 
Control Structures in Python
Control Structures in PythonControl Structures in Python
Control Structures in PythonSumit Satam
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python amiable_indian
 

What's hot (20)

Values and Data types in python
Values and Data types in pythonValues and Data types in python
Values and Data types in python
 
Functions in python slide share
Functions in python slide shareFunctions in python slide share
Functions in python slide share
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Python Functions
Python   FunctionsPython   Functions
Python Functions
 
python conditional statement.pptx
python conditional statement.pptxpython conditional statement.pptx
python conditional statement.pptx
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Introduction to Python Basics Programming
Introduction to Python Basics ProgrammingIntroduction to Python Basics Programming
Introduction to Python Basics Programming
 
Python-03| Data types
Python-03| Data typesPython-03| Data types
Python-03| Data types
 
Python PPT
Python PPTPython PPT
Python PPT
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Looping Statements and Control Statements in Python
Looping Statements and Control Statements in PythonLooping Statements and Control Statements in Python
Looping Statements and Control Statements in Python
 
Functions in python
Functions in pythonFunctions in python
Functions in python
 
Let’s Learn Python An introduction to Python
Let’s Learn Python An introduction to Python Let’s Learn Python An introduction to Python
Let’s Learn Python An 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
 
Variables & Data Types In Python | Edureka
Variables & Data Types In Python | EdurekaVariables & Data Types In Python | Edureka
Variables & Data Types In Python | Edureka
 
Control Structures in Python
Control Structures in PythonControl Structures in Python
Control Structures in Python
 
Python Presentation
Python PresentationPython Presentation
Python Presentation
 
Python
PythonPython
Python
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
 

Similar to 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
 

Similar to 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
 

More from 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
 

More from 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...
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

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