SlideShare a Scribd company logo
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Agenda
 Scripting languages
 Python Overview
 Python Installation
 Python Fundamentals
 Python Job Trends
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Scripting Languages
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Scripting Languages
A scripting language supports scripts or programs written for a special run-time environment that automate the execution
of tasks
Figure: Scripting Languages
 They are an alternative to programs executed one-by-one by a
human operator
 They are interpreted rather than being compiled
Python is the most popular Scripting Language in the industry
Program 1 Program 2 Program 3
Program 1 Program 2 Program 3
Script Script
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Python Overview
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
 Python is a high-level dynamic programming language
 Python supports multiple programming paradigms including object-
oriented, imperative, functional programming and procedural styles
 It is easy to learn and provides dynamic typing
 Used by vast multitude of companies around the globe
M O Z I L L A
Python Overview
Figure: Companies using Python
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Simplicity Of Python
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Simplicity Of Python
Figure: Python IDLE IDE
➢ Highly readable language
➢ Clean visual layout
➢ Less syntactic exceptions
➢ Superior string manipulation
➢ Elegant and dynamic typing
➢ Interpreted nature
➢ Ideal for scripting and rapid application
➢ Fit for many platforms
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Installation
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Installation - Python
Download Python 3.6.0 from
www.python.org/downloads
and install python-3.6.0.exe on
your Windows system
1
2
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Installation – PyCharm IDE
Download PyCharm from
jetbrains.com/pycharm/download
and install it on your system
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Python Fundamentals
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Python Fundamentals
The following are the five fundamentals required to master Python
Datatypes
Flow
Control
Functions
File
Handling
Object &
Class Datatypes
Numbers
Strings
Lists
Tuples
Dictionaries
Flow Control
If Else
For
While
Continue
Functions
Definition
Function Call
Docstring
Return
File Handling
Reading
Writing
Editing
Object & Class
Variables
Functions
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Datatypes
Numbers
Strings
Lists
Tuples
Dictionaries
Flow Control
If Else
For
While
Continue
Functions
Definition
Function Call
Docstring
Return
File Handling
Reading
Writing
Editing
Object & Class
Variables
Functions
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Operations
Attributes
OOP Datatype
Features
You do not need to
declare variables before
using them, or declare
their type
The type also determines
the object’s attributes and
items (if any) and whether
the object can be altered
An object’s type determines
what operations the object
supports, or, in other words,
what operations you can
perform on the data value
Python is completely
object oriented, and
not "statically typed"
Datatypes
All data values in Python are represented by objects and each object or value has a datatype
No
Declaration
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
a = 5
b = 7.3
c = 2 + 3j
a = [ 1, 2.2, “Python”] t = (2, “Tuple”, “95”)
s = “This is a string” b = ‘AnBnC’
week = {‘Mon’, ‘Tue’,
‘Wed’, ‘Thu’, ‘Fri’, ‘Sat’,
‘Sun’}
d = {‘value’:5, ‘key’:125}
if (number % 2) = 0:
even = True
else:
even = False
Native Datatypes
Boolean
True / False
Dictionaries
Unordered bags of
key-value pairs
Sets
Unordered bags
of values
Tuples
Ordered immutable
sequences of values
Lists
Ordered sequences of values
Numbers
Integers, Floats, Fractions and
Complex Numbers
Strings
Sequences of Unicode
Characters
Bytes & ByteArray
Contain Single Bytes
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Flow Control
If Else
For
While
Continue
Datatypes
Numbers
Strings
Lists
Tuples
Dictionaries
Functions
Definition
Function Call
Docstring
Return
File Handling
Reading
Writing
Editing
Object & Class
Variables
Functions
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Flow Control
 A program’s Flow Control is the order in which the program’s code executes
 To mimic the real world closer then you need to transform real world situations into your program
 For this you need to control the execution of your program statements using Flow Controls
Check
Turn
Start Task 1
Task 2 Task 3
Task 4
Figure: Controlled Flow In Python
Types of Flow Control if passcontinuefor breakwhile
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
if Statement
The Python compound statement ’if’ lets you
conditionally execute blocks of statements
Figure: Flowchart of if Statement
Body of if
Statement
just below if
Test
expression
True
False
if
for
while
break
continue
pass
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
if Statement
If
password
correct
if
for
while
break
continue
pass
YesNo
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
for Statement
The for statement in Python supports
repeated execution of a statement or block
of statements that is controlled by an
iterable expression
Executing Loop Body
Update Expression
Condition
Testing
True
False
Figure: Flowchart of for Statement
Exit For Loop
Start
Expression Initialization
if
while
break
continue
pass
for
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
for Statement
if
while
break
continue
pass
for
for friendlist[i] !=
NULL
Generate HTML for friendList[i]
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
while Statement
The while statement in Python supports repeated
execution of a statement or block of statements
that is controlled by a conditional expression
Body Of
While Loop
Test
Expression
True
False
Figure: Flowchart of while Statement
Statement
Below While
if
for
break
continue
pass
while
Difference between while and for loop
• For loop is used when we know the number of
iterations beforehand.
• While is used we know the range of values but
don’t know the exact number of iterations
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
while Statement
if
for
break
continue
pass
while
while (end
of page)
Load 10 more stories into Newsfeed
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
break Statement
The break statement is allowed only inside a
loop body. When break executes, the loop
terminates.
If a loop is nested inside other loops, break
terminates only the innermost nested loop.
Test Condition
Within Loop
True
Figure: Flowchart of break Statement
break
False
if
for
while
continue
pass
break
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
break Statement
if
for
while
continue
pass
break
for (Time =
Start Of
Alarm)
If Incoming
Call Occurs
till (Time =
End Of
Alarm)
break Alarm
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
continue Statement
The continue statement is allowed
only inside a loop body.
When continue executes, the current
iteration of the loop body
terminates, and execution continues
with the next iteration of the loop.
Test Condition
Within Loop
True
Figure: Flowchart of continue Statement
continue
False
Remaining
Part Of Loop
Normal Return
Of Loop
if
for
while
break
pass
continue
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
continue Statement
if
for
while
break
pass
continue
Start Of
Incoming
Call
If Alarm
Schedule
Time
End Of
Incoming
Call
Continue – Alarm To Snooze
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
pass Statement
The pass statement, which performs no
action, can be used as a placeholder
when a statement is syntactically required
but you have nothing specific to do.
Figure: Flowchart of pass Statement
Test Condition
Within Loop
True
Process 1
False
Normal Return
Of Loop
Else If
Condition
pass
Else
Condition
True
False
False
Process
Default
True
if
for
while
break
continue
pass
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Functions
Definition
Function Call
Docstring
Return
Flow Control
If Else
For
While
Continue
Datatypes
Numbers
Strings
Lists
Tuples
Dictionaries
File Handling
Reading
Writing
Editing
Object & Class
Variables
Functions
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Functions
 Functions in Python is a group of related statements that
performs a specific task
 Functions make our program more organized and help in
code reusability
Figure: Understanding Python functions
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Uses of Functions
Figure: Reversing a string
Figure: Function to reverse a string
 Functions help in code
reusability
 Functions provide
organization to the code
 Functions provide
abstraction
 Functions help in
extensibility
Uses of Functions
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
File Handling
Reading
Writing
Editing
Flow Control
If Else
For
While
Continue
Functions
Definition
Function Call
Docstring
Return
Datatypes
Numbers
Strings
Lists
Tuples
Dictionaries
Object & Class
Variables
Functions
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
File Handling
 File Handling refers to those operations that are used to read or write a file
 To perform file handling, we need to perform these steps:
1. Open File
2. Read / Write File
3. Close File
Open File
Write File
Read File
Close File
Figure: A file operation in Python takes place in the following order
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
File Handling – Opening A File
Opening A File
▪ Python has a built-in function open() to open a file
▪ This function returns a file object, also called a handle, as it is used to read or modify the file accordingly
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
File Handling – Writing To A File
Writing To A File
▪ In order to write into a file we need to open it in write 'w', append 'a' or exclusive
creation 'x' mode.
▪ We need to be careful with the 'w' mode as it will overwrite into the file if it already
exists. All previous data are erased.
▪ Writing a string or sequence of bytes (for binary files) is done using write() method.
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
File Handling – Reading From A File
Reading From A File
▪ To read the content of a file, we must open the file in reading mode.
▪ We can use the read(size) method to read in size number of data. If size parameter is
not specified, it reads and returns up to the end of the file
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
File Handling – Closing A File
Closing A File
▪ When we are done with operations to the file, we need to properly close it.
▪ Closing a file will free up the resources that were tied with the file and is
done using the close() method.
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Object & Class
Variables
Functions
Flow Control
If Else
For
While
Continue
Functions
Definition
Function Call
Docstring
Return
File Handling
Reading
Writing
Editing
Datatypes
Numbers
Strings
Lists
Tuples
Dictionaries
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Object & Class
➢ Python is an object oriented programming language.
➢ Object is simply a collection of data (variables) and methods
(functions) that act on those data.
➢ Class is a blueprint for the object.
Figure: Blueprint | Class Figure: Houses | Objects
A class is like a house’s blueprint. Objects are houses created from a blueprint.
Many houses can be created from a same blueprint.
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Defining Class & Creating Object
We define a class using the keyword class
The first string is called docstring and has a brief description about the class.
A class object can be used to create new object instances (instantiation) of that class.
The procedure to create an object is similar to a function call.
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Python Job Trends
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Python Job Trends
 The following is the Job Trend of
Python across the world
 Python has gradually acquired a
sizable share in the industry and is
the market leader from 2014
Source: www.indeed.com
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Python Success Story
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Python Success Story
“Python has been an important part of Google since the beginning,
and remains so as the system grows and evolves. Today dozens of
Google engineers use Python, and we're looking for more people with
skills in this language“
Source: Peter Norvig, Director, Google
M O Z I L L A
“When a user decides to share out an Instagram photo to Twitter or
Facebook, we push that task into Gearman, a task queue system
where the whole of Instagram is written in Python”
Source: www.engineering.instagram.com
“Mozilla is moving 2 of its largest sites (addons.mozilla.org and
support.mozilla.com) from PHP to Python”
Source: www.micropipes.com
“Facebook’s Tornado is a relatively simple, non-blocking Web server
framework written in Python, designed to handle thousands of
simultaneous connections, making it ideal for real-time Web services”
Source: www.developers.facebook.com
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Summary
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Summary
Scripting Languages
Job TrendsPython Fundamentals
Python Overview
Success Stories
Installation
www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING
Thank You …
Questions/Queries/Feedback

More Related Content

PDF
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
PDF
Python Basics
PPTX
Python
PDF
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
PPTX
Python 3 Programming Language
PDF
Introduction to python programming
PPTX
Python
PPT
Python ppt
Python Tutorial | Python Tutorial for Beginners | Python Training | Edureka
Python Basics
Python
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
Python 3 Programming Language
Introduction to python programming
Python
Python ppt

What's hot (20)

PDF
Python Basics | Python Tutorial | Edureka
PDF
Introduction To Python | Edureka
PDF
Python basic
PDF
Introduction to python
PDF
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
PPTX
PPTX
Introduction to python
PDF
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
PPTX
Introduction to the basics of Python programming (part 1)
PDF
Variables & Data Types In Python | Edureka
PPTX
Python basics
PDF
Python Class | Python Programming | Python Tutorial | Edureka
PDF
Python Generators
PDF
Python Programming Tutorial | Edureka
PDF
Python Intro
PPTX
Python Functions
PPTX
Python programming
PPTX
Class, object and inheritance in python
PPTX
Introduction to python
Python Basics | Python Tutorial | Edureka
Introduction To Python | Edureka
Python basic
Introduction to python
Python Functions Tutorial | Working With Functions In Python | Python Trainin...
Introduction to python
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Introduction to the basics of Python programming (part 1)
Variables & Data Types In Python | Edureka
Python basics
Python Class | Python Programming | Python Tutorial | Edureka
Python Generators
Python Programming Tutorial | Edureka
Python Intro
Python Functions
Python programming
Class, object and inheritance in python
Introduction to python
Ad

Viewers also liked (8)

PPT
Srinivasa ramanujan
PDF
Cemtobent detail int.
PDF
Blake Lapthorn Construction green breakfast - 5th Studio presentation - 20 Ma...
PPTX
PPT ON Srinivasa ramanujan
PPT
Charless babbage
PDF
Brochure congreso andino
PPS
Life of ramanujan
PPT
Basics of c++ Programming Language
Srinivasa ramanujan
Cemtobent detail int.
Blake Lapthorn Construction green breakfast - 5th Studio presentation - 20 Ma...
PPT ON Srinivasa ramanujan
Charless babbage
Brochure congreso andino
Life of ramanujan
Basics of c++ Programming Language
Ad

Similar to Python Programming Language | Python Classes | Python Tutorial | Python Training | Edureka (20)

PDF
Python Programming | Python Programming For Beginners | Python Tutorial | Edu...
PPTX
Python Tutorial for Beginner
DOCX
INTERNSHIP REPORT.docx
PDF
Python Workshop
ODP
20120314 changa-python-workshop
PPTX
PPT_203105211_3.pptx
PDF
Python Interview Questions And Answers 2019 | Edureka
PDF
Getting started with Python
PDF
Python Loops Tutorial | Python For Loop | While Loop Python | Python Training...
PPT
Python session3
PDF
Best data analyst course syllabus 2025.pdf
PDF
Python Developer Certification
PPTX
Basic of Python- Hands on Session
PDF
Reinforcement Learning Tutorial | Edureka
PPTX
Python course task 10 guruprasanth.s
PPTX
010 CONDITION USING IF-converted.pptx
PPTX
Introduction to Python for Data Science and Machine Learning
PPTX
Types of Statements in Python Programming Language
PPTX
Python_Haegl.powerpoint presentation. tx
PDF
Core python programming tutorial
Python Programming | Python Programming For Beginners | Python Tutorial | Edu...
Python Tutorial for Beginner
INTERNSHIP REPORT.docx
Python Workshop
20120314 changa-python-workshop
PPT_203105211_3.pptx
Python Interview Questions And Answers 2019 | Edureka
Getting started with Python
Python Loops Tutorial | Python For Loop | While Loop Python | Python Training...
Python session3
Best data analyst course syllabus 2025.pdf
Python Developer Certification
Basic of Python- Hands on Session
Reinforcement Learning Tutorial | Edureka
Python course task 10 guruprasanth.s
010 CONDITION USING IF-converted.pptx
Introduction to Python for Data Science and Machine Learning
Types of Statements in Python Programming Language
Python_Haegl.powerpoint presentation. tx
Core python programming tutorial

More from Edureka! (20)

PDF
What to learn during the 21 days Lockdown | Edureka
PDF
Top 10 Dying Programming Languages in 2020 | Edureka
PDF
Top 5 Trending Business Intelligence Tools | Edureka
PDF
Tableau Tutorial for Data Science | Edureka
PDF
Top 5 PMP Certifications | Edureka
PDF
Top Maven Interview Questions in 2020 | Edureka
PDF
Linux Mint Tutorial | Edureka
PDF
How to Deploy Java Web App in AWS| Edureka
PDF
Importance of Digital Marketing | Edureka
PDF
RPA in 2020 | Edureka
PDF
Email Notifications in Jenkins | Edureka
PDF
EA Algorithm in Machine Learning | Edureka
PDF
Cognitive AI Tutorial | Edureka
PDF
AWS Cloud Practitioner Tutorial | Edureka
PDF
Blue Prism Top Interview Questions | Edureka
PDF
Big Data on AWS Tutorial | Edureka
PDF
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
PDF
Kubernetes Installation on Ubuntu | Edureka
PDF
Introduction to DevOps | Edureka
PDF
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka
What to learn during the 21 days Lockdown | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Tableau Tutorial for Data Science | Edureka
Top 5 PMP Certifications | Edureka
Top Maven Interview Questions in 2020 | Edureka
Linux Mint Tutorial | Edureka
How to Deploy Java Web App in AWS| Edureka
Importance of Digital Marketing | Edureka
RPA in 2020 | Edureka
Email Notifications in Jenkins | Edureka
EA Algorithm in Machine Learning | Edureka
Cognitive AI Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Blue Prism Top Interview Questions | Edureka
Big Data on AWS Tutorial | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Kubernetes Installation on Ubuntu | Edureka
Introduction to DevOps | Edureka
ITIL® Tutorial for Beginners | ITIL® Foundation Training | Edureka

Recently uploaded (20)

PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Big Data Technologies - Introduction.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Building Integrated photovoltaic BIPV_UPV.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Big Data Technologies - Introduction.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
NewMind AI Monthly Chronicles - July 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Digital-Transformation-Roadmap-for-Companies.pptx
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
The AUB Centre for AI in Media Proposal.docx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf

Python Programming Language | Python Classes | Python Tutorial | Python Training | Edureka

  • 2. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Agenda  Scripting languages  Python Overview  Python Installation  Python Fundamentals  Python Job Trends
  • 4. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Scripting Languages A scripting language supports scripts or programs written for a special run-time environment that automate the execution of tasks Figure: Scripting Languages  They are an alternative to programs executed one-by-one by a human operator  They are interpreted rather than being compiled Python is the most popular Scripting Language in the industry Program 1 Program 2 Program 3 Program 1 Program 2 Program 3 Script Script
  • 6. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING  Python is a high-level dynamic programming language  Python supports multiple programming paradigms including object- oriented, imperative, functional programming and procedural styles  It is easy to learn and provides dynamic typing  Used by vast multitude of companies around the globe M O Z I L L A Python Overview Figure: Companies using Python
  • 8. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Simplicity Of Python Figure: Python IDLE IDE ➢ Highly readable language ➢ Clean visual layout ➢ Less syntactic exceptions ➢ Superior string manipulation ➢ Elegant and dynamic typing ➢ Interpreted nature ➢ Ideal for scripting and rapid application ➢ Fit for many platforms
  • 10. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Installation - Python Download Python 3.6.0 from www.python.org/downloads and install python-3.6.0.exe on your Windows system 1 2
  • 11. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Installation – PyCharm IDE Download PyCharm from jetbrains.com/pycharm/download and install it on your system
  • 13. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Python Fundamentals The following are the five fundamentals required to master Python Datatypes Flow Control Functions File Handling Object & Class Datatypes Numbers Strings Lists Tuples Dictionaries Flow Control If Else For While Continue Functions Definition Function Call Docstring Return File Handling Reading Writing Editing Object & Class Variables Functions
  • 14. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Datatypes Numbers Strings Lists Tuples Dictionaries Flow Control If Else For While Continue Functions Definition Function Call Docstring Return File Handling Reading Writing Editing Object & Class Variables Functions
  • 15. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Operations Attributes OOP Datatype Features You do not need to declare variables before using them, or declare their type The type also determines the object’s attributes and items (if any) and whether the object can be altered An object’s type determines what operations the object supports, or, in other words, what operations you can perform on the data value Python is completely object oriented, and not "statically typed" Datatypes All data values in Python are represented by objects and each object or value has a datatype No Declaration
  • 16. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING a = 5 b = 7.3 c = 2 + 3j a = [ 1, 2.2, “Python”] t = (2, “Tuple”, “95”) s = “This is a string” b = ‘AnBnC’ week = {‘Mon’, ‘Tue’, ‘Wed’, ‘Thu’, ‘Fri’, ‘Sat’, ‘Sun’} d = {‘value’:5, ‘key’:125} if (number % 2) = 0: even = True else: even = False Native Datatypes Boolean True / False Dictionaries Unordered bags of key-value pairs Sets Unordered bags of values Tuples Ordered immutable sequences of values Lists Ordered sequences of values Numbers Integers, Floats, Fractions and Complex Numbers Strings Sequences of Unicode Characters Bytes & ByteArray Contain Single Bytes
  • 17. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Flow Control If Else For While Continue Datatypes Numbers Strings Lists Tuples Dictionaries Functions Definition Function Call Docstring Return File Handling Reading Writing Editing Object & Class Variables Functions
  • 18. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Flow Control  A program’s Flow Control is the order in which the program’s code executes  To mimic the real world closer then you need to transform real world situations into your program  For this you need to control the execution of your program statements using Flow Controls Check Turn Start Task 1 Task 2 Task 3 Task 4 Figure: Controlled Flow In Python Types of Flow Control if passcontinuefor breakwhile
  • 19. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING if Statement The Python compound statement ’if’ lets you conditionally execute blocks of statements Figure: Flowchart of if Statement Body of if Statement just below if Test expression True False if for while break continue pass
  • 20. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING if Statement If password correct if for while break continue pass YesNo
  • 21. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING for Statement The for statement in Python supports repeated execution of a statement or block of statements that is controlled by an iterable expression Executing Loop Body Update Expression Condition Testing True False Figure: Flowchart of for Statement Exit For Loop Start Expression Initialization if while break continue pass for
  • 22. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING for Statement if while break continue pass for for friendlist[i] != NULL Generate HTML for friendList[i]
  • 23. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING while Statement The while statement in Python supports repeated execution of a statement or block of statements that is controlled by a conditional expression Body Of While Loop Test Expression True False Figure: Flowchart of while Statement Statement Below While if for break continue pass while Difference between while and for loop • For loop is used when we know the number of iterations beforehand. • While is used we know the range of values but don’t know the exact number of iterations
  • 24. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING while Statement if for break continue pass while while (end of page) Load 10 more stories into Newsfeed
  • 25. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING break Statement The break statement is allowed only inside a loop body. When break executes, the loop terminates. If a loop is nested inside other loops, break terminates only the innermost nested loop. Test Condition Within Loop True Figure: Flowchart of break Statement break False if for while continue pass break
  • 26. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING break Statement if for while continue pass break for (Time = Start Of Alarm) If Incoming Call Occurs till (Time = End Of Alarm) break Alarm
  • 27. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING continue Statement The continue statement is allowed only inside a loop body. When continue executes, the current iteration of the loop body terminates, and execution continues with the next iteration of the loop. Test Condition Within Loop True Figure: Flowchart of continue Statement continue False Remaining Part Of Loop Normal Return Of Loop if for while break pass continue
  • 28. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING continue Statement if for while break pass continue Start Of Incoming Call If Alarm Schedule Time End Of Incoming Call Continue – Alarm To Snooze
  • 29. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING pass Statement The pass statement, which performs no action, can be used as a placeholder when a statement is syntactically required but you have nothing specific to do. Figure: Flowchart of pass Statement Test Condition Within Loop True Process 1 False Normal Return Of Loop Else If Condition pass Else Condition True False False Process Default True if for while break continue pass
  • 30. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Functions Definition Function Call Docstring Return Flow Control If Else For While Continue Datatypes Numbers Strings Lists Tuples Dictionaries File Handling Reading Writing Editing Object & Class Variables Functions
  • 31. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Functions  Functions in Python is a group of related statements that performs a specific task  Functions make our program more organized and help in code reusability Figure: Understanding Python functions
  • 32. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Uses of Functions Figure: Reversing a string Figure: Function to reverse a string  Functions help in code reusability  Functions provide organization to the code  Functions provide abstraction  Functions help in extensibility Uses of Functions
  • 33. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING File Handling Reading Writing Editing Flow Control If Else For While Continue Functions Definition Function Call Docstring Return Datatypes Numbers Strings Lists Tuples Dictionaries Object & Class Variables Functions
  • 34. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING File Handling  File Handling refers to those operations that are used to read or write a file  To perform file handling, we need to perform these steps: 1. Open File 2. Read / Write File 3. Close File Open File Write File Read File Close File Figure: A file operation in Python takes place in the following order
  • 35. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING File Handling – Opening A File Opening A File ▪ Python has a built-in function open() to open a file ▪ This function returns a file object, also called a handle, as it is used to read or modify the file accordingly
  • 36. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING File Handling – Writing To A File Writing To A File ▪ In order to write into a file we need to open it in write 'w', append 'a' or exclusive creation 'x' mode. ▪ We need to be careful with the 'w' mode as it will overwrite into the file if it already exists. All previous data are erased. ▪ Writing a string or sequence of bytes (for binary files) is done using write() method.
  • 37. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING File Handling – Reading From A File Reading From A File ▪ To read the content of a file, we must open the file in reading mode. ▪ We can use the read(size) method to read in size number of data. If size parameter is not specified, it reads and returns up to the end of the file
  • 38. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING File Handling – Closing A File Closing A File ▪ When we are done with operations to the file, we need to properly close it. ▪ Closing a file will free up the resources that were tied with the file and is done using the close() method.
  • 39. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Object & Class Variables Functions Flow Control If Else For While Continue Functions Definition Function Call Docstring Return File Handling Reading Writing Editing Datatypes Numbers Strings Lists Tuples Dictionaries
  • 40. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Object & Class ➢ Python is an object oriented programming language. ➢ Object is simply a collection of data (variables) and methods (functions) that act on those data. ➢ Class is a blueprint for the object. Figure: Blueprint | Class Figure: Houses | Objects A class is like a house’s blueprint. Objects are houses created from a blueprint. Many houses can be created from a same blueprint.
  • 41. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Defining Class & Creating Object We define a class using the keyword class The first string is called docstring and has a brief description about the class. A class object can be used to create new object instances (instantiation) of that class. The procedure to create an object is similar to a function call.
  • 43. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Python Job Trends  The following is the Job Trend of Python across the world  Python has gradually acquired a sizable share in the industry and is the market leader from 2014 Source: www.indeed.com
  • 44. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Python Success Story
  • 45. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Python Success Story “Python has been an important part of Google since the beginning, and remains so as the system grows and evolves. Today dozens of Google engineers use Python, and we're looking for more people with skills in this language“ Source: Peter Norvig, Director, Google M O Z I L L A “When a user decides to share out an Instagram photo to Twitter or Facebook, we push that task into Gearman, a task queue system where the whole of Instagram is written in Python” Source: www.engineering.instagram.com “Mozilla is moving 2 of its largest sites (addons.mozilla.org and support.mozilla.com) from PHP to Python” Source: www.micropipes.com “Facebook’s Tornado is a relatively simple, non-blocking Web server framework written in Python, designed to handle thousands of simultaneous connections, making it ideal for real-time Web services” Source: www.developers.facebook.com
  • 47. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Summary Scripting Languages Job TrendsPython Fundamentals Python Overview Success Stories Installation
  • 48. www.edureka.co/pythonEDUREKA PYTHON CERTIFICATION TRAINING Thank You … Questions/Queries/Feedback