SlideShare a Scribd company logo
Python3: Zero to Hero
Introduction to Python3 Programming Language
July 2017
Chariza Pladin
Data Analyst - Accenture Inc.
chariza.b.pladin@accenture.com
AGENDA
● Intro to Python
● Why learn Python
● Basic Python Syntax
● Coding Time!
● Python Q/A
COURSE MODULE CODE COMPILER
Python3: Zero to Hero - Introduction to Python Programming
Zero to Hero - Introduction to Python3
High-level programming language for
general-purpose programming, created by Guido
van Rossum and first released in 1991.
Python
Python is great for backend web development,
data analysis, artificial intelligence, and scientific
computing. Many developers have also used
Python to build productivity tools, games, and
desktop apps, so there are plenty of resources to
help you learn.
Guido van Rossum
● University of Amsterdam
- MA in Mathematics and
Computer Science 1982
● Benevolent Dictator For
Life (BDFL)
● Google (2005 - Dec
2012)
● Dropbox (2012 - Present)
“ I was looking for a hobby programming
project that would keep me occupied during the
week around Christmas. My office ... would be
closed, but I had a home computer, and not
much else on my hands. “
Why learn Python?
Python3: Zero to Hero - Introduction to Python Programming
Great for
Beginners
Simple
Elegant
Syntax
Python takes coding like natural
human-language.
Not
overly
Strict
You don't need to define the
type of a variable in Python.
Expressive of Language
Python allows you to write programs having greater
functionality with fewer lines of code.
Very Flexible
As a dynamically typed language, Python is really
flexible. This means there are no hard rules on how to
build features, and you'll have more flexibility solving
problems using different methods.
Furthermore, Python is also more forgiving of errors, so
you'll still be able to compile and run your program
until you hit the problematic part.
Python on
Pseudocodes
Python3: Zero to Hero - Introduction to Python Programming
Career
Opportunities
and
the Future
Salary Range
Companies that uses Python
Django-Powered Applications
The import
system
Modules importing
Modules
Modules can define functions, classes, and variables that
you can reference in other Python .py files or via the Python
command line interpreter.
Modules are accessed by using the import statement.
When you do this, you execute the code of the module,
keeping the scopes of the definitions so that your current
file(s) can make use of these.
Python Frameworks
DATA
SCIENCE
MACHINE
LEARNING
GAME
DEVELOPMENT
WEB
DEVELOPMENT
Basic Syntax
Variable
A variable is a location in memory used to store some data
(value).
We don't need to declare a variable before using it.
In Python, we simply assign a value to a variable and it will
exist. We don't even have to declare the type of the variable.
This is handled internally according to the type of value we
assign to the variable.
Variable Assignment
We use the assignment operator (=) to assign values to a
variable. Any type of value can be assigned to any valid
variable.
Multiple Assignment
In Python, multiple assignments can be made in a single
statement as follows:
If we want to assign the same value to multiple variables at
once, we can do this as
Basic Operators
Basic Operators
Python language supports the following types of operators.
● Arithmetic Operators
● Comparison (Relational) Operators
● Assignment Operators
● Logical Operators
● Bitwise Operators
● Membership Operators
● Identity Operators
Basic Operators
● + Addition
● - Subtraction
● * Multiplication
● / Division
● % Modulus
● ** Exponent
● // Floor Division
Python Comparison Operators
● == Equal
● != Not Equal
● > Greater than
● < Less than
● >= Greater than or equal to
● <= Less than or equal to
Python Assignment Operators
● = Equal
● += Add AND
● -= Subtract AND
● *= Multiply AND
● /= Divide AND
● %= Modulus AND
● **= Exponent AND
● //= Floor Division
Python Bitwise Operators
● & Binary AND
● | Binary OR
● ^ Binary XOR
● ~ Binary Ones Complement
● << Binary Left Shift
● >> Binary Right Shift
Python Membership Operators
Python Identity Operators
Python Data Types
Data Types
Numeric Types
● int: Integers;
● long: Long integers of non-limited length;
● float: Floating-Point numbers, equivalent to C doubles
● complex: Complex Numbers
Sequences Types
● str: String;
● bytes: a sequence of integers in the range of 0-255; only available in Python 3.x
● byte array: like bytes, but mutable
● list
● tuple
Data Types (cont.)
Sets:
● set: an unordered collection of unique objects;
● frozen set: like set, but immutable
Mappings:
● dict: Python dictionaries, also called hashmaps or associative
arrays,
Mutable vs. Immutable Objects
Data types in Python can be distinguished based on whether objects of the type are
mutable or immutable. The content of objects of immutable types cannot be
changed after they are created.
Some immutable types: Some mutable types:
int, float, long, complex
str
bytes
tuple
frozen set
byte array
list
set
dict
List
List is the most versatile data type available in Python
which can be written as a list of comma-separated values
(items) between square brackets.
Important thing about a list is that items in a list need not
be of the same type.
List
Basic List Operations
Indexing, Slicing, and Matrixes
Built-in List
Functions
List
Methods
List
Methods
(cont.)
Tuple
Tuples are immutable which means you cannot update or
change the values of tuple elements.
Tuple Examples
Basic Tuple Operations
Indexing, Slicing, and Matrixes
Built-in
Tuple
Functions
Dictionary
Each key is separated from its value by a colon (:), the
items are separated by commas, and the whole thing is
enclosed in curly braces.
Keys are unique within a dictionary while values may not be.
The values of a dictionary can be of any type, but the keys
must be of an immutable data type such as strings,
numbers, or tuples.
Dictionary Examples
Accessing Values in Dictionary
Updating Values in Dictionary
Deleting Values in Dictionary
Dictionary
Function
and
Methods
Dictionary
Function
and
Methods
(cont.)
Built-in
Dictionary
Functions
Strings
Strings are amongst the most popular types in Python. We
can create them simply by enclosing characters in quotes.
Python treats single quotes the same as double quotes.
Creating strings is as simple as assigning a value to a
variable.
Accessing String Values
Python does not support a character type; these are treated
as strings of length one, thus also considered a substring.
Updating Strings
You can "update" an existing string by (re)assigning a
variable to another string. The new value can be related to
its previous value or to a completely different string
altogether.
Built-in
String
Methods
Built-in
String
Methods
(cont.)
Built-in
String
Methods
(cont.)
Built-in
String
Methods
(cont.)
Built-in
String
Methods
(cont.)
Python3: Zero to Hero - Introduction to Python Programming
Python Decision
Making
Decision Making
Decision making is anticipation of conditions occurring
while execution of the program and specifying actions
taken according to the conditions.
Decision structures evaluate multiple expressions which
produce TRUE or FALSE as outcome. You need to
determine which action to take and which statements to
execute if outcome is TRUE or FALSE otherwise.
Decision Making
Decision Making
Python3: Zero to Hero - Introduction to Python Programming
Python Loops
Loops
In general, statements are executed sequentially: The first
statement in a function is executed first, followed by the
second, and so on. There may be a situation when you need
to execute a block of code several number of times.
A loop statement allows us to execute a statement or group
of statements multiple times.
Loops
Loops Control
Range()
-returns an immutable sequence object of integers between
the given start integer to the stop integer.
Syntax:
range(stop)
range(start, stop[, step])
start - integer starting from which the sequence of
integers is to be returned
stop - integer before which the sequence of integers is
to be returned.
The range of integers end at stop - 1.
step (Optional) - integer value which determines the
increment between each integer in the sequence
Range() Parameters
Scope
Resolution
and the
LEGB Rule
Scope
“hierarchy level” in which we search namespaces for certain
“name-to-object” mappings.
Python3: Zero to Hero - Introduction to Python Programming
LEGB Rule
● Local can be inside a function or class method, for
example.
● Enclosed can be its enclosing function, e.g., if a
function is wrapped inside another function.
● Global refers to the uppermost level of the executing
script itself, and
● Built-in are special names that Python reserves for
itself.
Python Functions
Functions
A function is a block of organized, reusable code that is
used to perform a single, related action. Functions provide
better modularity for your application and a high degree of
code reusing.
Python3: Zero to Hero - Introduction to Python Programming
Function blocks begin with the keyword
def followed by the function name and
parentheses ( ( ) )
Any input
parameters or
arguments should
be placed within
these parentheses.
You can also define
parameters inside
these parentheses.the documentation
string of the
function or
docstring.
statement return [expression] exits a
function, optionally passing back an
expression to the caller.
Docstrings
A docstring is a string literal that occurs as the first
statement in a module, function, class, or method definition.
Such a docstring becomes the __doc__ special attribute of
that object.
Comments
Comments are little snippets of text embedded inside your
code that are ignored by the Python interpreter.
A comment is denoted by the hash character (#) and
extends to the end of the line.:
Functions Examples
Coding Time
Python3: Zero to Hero - Introduction to Python Programming
Test Cases
● Random Password Generator
● Pangram Word Test
● If-Else Allergic Arithmetic Operations
● Weird Case and Mexican Wave
Python3: Zero to Hero - Introduction to Python Programming
Python3: Zero to Hero - Introduction to Python Programming
Ask me
anything about
Python :)

More Related Content

PPT
Python ppt
Mohita Pandey
 
PDF
Python final ppt
Ripal Ranpara
 
PPT
Introduction to Python
Nowell Strite
 
PPTX
Introduction to python
Ayshwarya Baburam
 
PPTX
Python 3 Programming Language
Tahani Al-Manie
 
PPTX
Introduction to python for Beginners
Sujith Kumar
 
PDF
Dangerous goods regulations CAT 12
Mohamed Tayfour
 
PDF
Introduction to Machine learning with Python
Chariza Pladin
 
Python ppt
Mohita Pandey
 
Python final ppt
Ripal Ranpara
 
Introduction to Python
Nowell Strite
 
Introduction to python
Ayshwarya Baburam
 
Python 3 Programming Language
Tahani Al-Manie
 
Introduction to python for Beginners
Sujith Kumar
 
Dangerous goods regulations CAT 12
Mohamed Tayfour
 
Introduction to Machine learning with Python
Chariza Pladin
 

What's hot (20)

PPTX
Python for loop
Aishwarya Deshmukh
 
PPTX
Python - An Introduction
Swarit Wadhe
 
PPTX
Python OOPs
Binay Kumar Ray
 
PPTX
Beginning Python Programming
St. Petersburg College
 
PDF
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
 
PDF
Python libraries
Prof. Dr. K. Adisesha
 
PDF
Overview of python 2019
Samir Mohanty
 
PDF
Introduction to python programming
Srinivas Narasegouda
 
PPT
Introduction to Python
amiable_indian
 
PPTX
Phython Programming Language
R.h. Himel
 
PPTX
Python basics
Jyoti shukla
 
PPTX
Intro to Python Programming Language
Dipankar Achinta
 
PDF
Python course syllabus
Sugantha T
 
PPT
Intro to Python
primeteacher32
 
PPTX
Introduction to-python
Aakashdata
 
PPTX
Data types in python
RaginiJain21
 
PDF
Python Programming Tutorial | Edureka
Edureka!
 
PPTX
Python 101: Python for Absolute Beginners (PyTexas 2014)
Paige Bailey
 
ODP
Python Presentation
Narendra Sisodiya
 
Python for loop
Aishwarya Deshmukh
 
Python - An Introduction
Swarit Wadhe
 
Python OOPs
Binay Kumar Ray
 
Beginning Python Programming
St. Petersburg College
 
Python Programming Language | Python Classes | Python Tutorial | Python Train...
Edureka!
 
Python libraries
Prof. Dr. K. Adisesha
 
Overview of python 2019
Samir Mohanty
 
Introduction to python programming
Srinivas Narasegouda
 
Introduction to Python
amiable_indian
 
Phython Programming Language
R.h. Himel
 
Python basics
Jyoti shukla
 
Intro to Python Programming Language
Dipankar Achinta
 
Python course syllabus
Sugantha T
 
Intro to Python
primeteacher32
 
Introduction to-python
Aakashdata
 
Data types in python
RaginiJain21
 
Python Programming Tutorial | Edureka
Edureka!
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Paige Bailey
 
Python Presentation
Narendra Sisodiya
 
Ad

Viewers also liked (15)

PPTX
Viva Presentation - Fuzzy Logic and Dempster-Shafer Theory to Detect The Risk...
Andino Maseleno
 
PDF
Data Analysis and Visualization using Python
Chariza Pladin
 
PDF
How tech can spark social change
Anne-Marie Elias
 
PDF
Ebriks-An idea to change your bussiness growth
ebriksinfotech
 
PPSX
2018 Sony World Photography Awards: Featured Entries (1)
maditabalnco
 
PPT
Open Source Software in Libraries
Sukhdev Singh
 
PDF
Intro to Web Development Using Python and Django
Chariza Pladin
 
PDF
Approved budget Fiscal Year 2018
Houston Community College
 
PDF
LED Display Boards - (Moving LED Display)
Organized Outdoor Options
 
PDF
Roadmap for landing a role at a Tech Startup
Panji Gautama
 
PPTX
Peer to-peer mobile payments
Ishraq Al Fataftah
 
PDF
Game Development With Python and Pygame
Chariza Pladin
 
PDF
Top Libraries for Machine Learning with Python
Chariza Pladin
 
PDF
Free & Open Source Software (2017 update)
Frederik Questier
 
PPTX
Display Advertising's New Wave
Jonathan Mendez
 
Viva Presentation - Fuzzy Logic and Dempster-Shafer Theory to Detect The Risk...
Andino Maseleno
 
Data Analysis and Visualization using Python
Chariza Pladin
 
How tech can spark social change
Anne-Marie Elias
 
Ebriks-An idea to change your bussiness growth
ebriksinfotech
 
2018 Sony World Photography Awards: Featured Entries (1)
maditabalnco
 
Open Source Software in Libraries
Sukhdev Singh
 
Intro to Web Development Using Python and Django
Chariza Pladin
 
Approved budget Fiscal Year 2018
Houston Community College
 
LED Display Boards - (Moving LED Display)
Organized Outdoor Options
 
Roadmap for landing a role at a Tech Startup
Panji Gautama
 
Peer to-peer mobile payments
Ishraq Al Fataftah
 
Game Development With Python and Pygame
Chariza Pladin
 
Top Libraries for Machine Learning with Python
Chariza Pladin
 
Free & Open Source Software (2017 update)
Frederik Questier
 
Display Advertising's New Wave
Jonathan Mendez
 
Ad

Similar to Zero to Hero - Introduction to Python3 (20)

PDF
🐍⚡ “Python Panache: Code Like a Pro, Not a Programmer!”
yashikanigam1
 
PDF
Top 80 Interview Questions on Python for Data Science | Tutort - Best Data Sc...
Tutort Academy
 
PPT
Python - Module 1.ppt
jaba kumar
 
PPTX
Python (Data Analysis) cleaning and visualize
IruolagbePius
 
PPTX
Introduction to Python for Data Science and Machine Learning
ParrotAI
 
PDF
Python for katana
kedar nath
 
PPTX
PYTHON PPT.pptx python is very useful for day to day life
NaitikSingh33
 
PPTX
lakshya's ppt python for final final.pptx
krishan123sharma123
 
PDF
Python Course In Chandigarh
Excellence Academy
 
PPTX
Python PPT.pptx
JosephMuez2
 
PPTX
Introduction on basic python and it's application
sriram2110
 
PDF
Python_Unit_1.pdf
alaparthi
 
PDF
Python (3).pdf
samiwaris2
 
PPTX
Introduction to Python programming Language
MansiSuthar3
 
PDF
Python Basics Understanding Variables.pdf
codingmaster021
 
PDF
Python Basics Understanding Variables.pdf
codingmaster021
 
PDF
Python Programming
Saravanan T.M
 
PPTX
Python 01.pptx
AliMohammadAmiri
 
PPTX
python notes for MASTER OF COMPUTER APPLIICATION_ppt.pptx
yuvarajkumar334
 
PDF
prakash ppt (2).pdf
ShivamKS4
 
🐍⚡ “Python Panache: Code Like a Pro, Not a Programmer!”
yashikanigam1
 
Top 80 Interview Questions on Python for Data Science | Tutort - Best Data Sc...
Tutort Academy
 
Python - Module 1.ppt
jaba kumar
 
Python (Data Analysis) cleaning and visualize
IruolagbePius
 
Introduction to Python for Data Science and Machine Learning
ParrotAI
 
Python for katana
kedar nath
 
PYTHON PPT.pptx python is very useful for day to day life
NaitikSingh33
 
lakshya's ppt python for final final.pptx
krishan123sharma123
 
Python Course In Chandigarh
Excellence Academy
 
Python PPT.pptx
JosephMuez2
 
Introduction on basic python and it's application
sriram2110
 
Python_Unit_1.pdf
alaparthi
 
Python (3).pdf
samiwaris2
 
Introduction to Python programming Language
MansiSuthar3
 
Python Basics Understanding Variables.pdf
codingmaster021
 
Python Basics Understanding Variables.pdf
codingmaster021
 
Python Programming
Saravanan T.M
 
Python 01.pptx
AliMohammadAmiri
 
python notes for MASTER OF COMPUTER APPLIICATION_ppt.pptx
yuvarajkumar334
 
prakash ppt (2).pdf
ShivamKS4
 

Recently uploaded (20)

PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PPTX
Presentation on Janskhiya sthirata kosh.
Ms Usha Vadhel
 
PPTX
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
PPTX
Strengthening open access through collaboration: building connections with OP...
Jisc
 
PPTX
How to Manage Global Discount in Odoo 18 POS
Celine George
 
PDF
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
PPTX
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PPT
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PDF
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
PDF
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
PDF
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
PPTX
Understanding operators in c language.pptx
auteharshil95
 
PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PDF
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
PPTX
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Presentation on Janskhiya sthirata kosh.
Ms Usha Vadhel
 
IMMUNIZATION PROGRAMME pptx
AneetaSharma15
 
Strengthening open access through collaboration: building connections with OP...
Jisc
 
How to Manage Global Discount in Odoo 18 POS
Celine George
 
Electricity-Magnetic-and-Heating-Effects 4th Chapter/8th-science-curiosity.pd...
Sandeep Swamy
 
Open Quiz Monsoon Mind Game Final Set.pptx
Sourav Kr Podder
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
Phylum Arthropoda: Characteristics and Classification, Entomology Lecture
Miraj Khan
 
Module 3: Health Systems Tutorial Slides S2 2025
Jonathan Hallett
 
Understanding operators in c language.pptx
auteharshil95
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
Software Engineering BSC DS UNIT 1 .pptx
Dr. Pallawi Bulakh
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 

Zero to Hero - Introduction to Python3