SlideShare a Scribd company logo
Introduction to Python
BOGDAN SABAU
6 JUNE 2015, SOFTVISION
Agenda
◦ About me
◦ What is Python
◦ Why use Python
◦ Python 101
◦ QA
About me
What is Python
oWidely used high-level programming language
oCreated in Netherlands by Guido van Rossum at the end of the 80s
oNamed after Monthy Python
oStrong emphasizes on code readability and simplicity
oSupports multiple programming paradigms
oNOT A SNAKE!
What is Python
oWidely used high-level programming language
oCreated in Netherlands by Guido van Rossum at the end of the 80s
oNamed after Monthy Python
oStrong emphasizes on code readability and simplicity
oSupports multiple programming paradigms
oNOT A SNAKE!
Why use Python
oSimplicity
oFewer lines => less buggy code and reduce development time
o3rd party resources
oAvailable on multiple OS
oOpen source and mature
oUsed by: Google, Dropbox, Eventbrite, Quora, SlideShare, Reedit
Python 101
oTwo main versions: 2.x and 3.x
oIDE: IDLE, PyDev, PyCharm, Visual Studio
oOnline jupyter.org
oINDENTATION COUNTS!
Python 101
VARIABLES
◦ Must have an initial value
◦ We can define multiple variables at once
◦ Case sensitive
◦ Can contain letter, number or underscore
◦ Some reserved word cannot be used
Python 101
OPERATIONS
◦ Addition (+)
◦ Subtraction (-)
◦ Multiplication (*)
◦ Division (/)
◦ Floor division (//)
◦ Modulus (%)
◦ Exponent (**)
Python 101
DATA TYPES
◦ Integers
◦ 23, -4, 99934
◦ Float
◦ 0.333, -8.8, 883.009
◦ String
◦ “Hola Buenes", ‘Arturo Maran’
◦ Value of index cannot be changed!
Python 101
DATA TYPES
◦ Lists
◦ Compound data types
◦ Normally related but can have different types into them
◦ Alist = [1, 3, 4, 5]
◦ Blist = [1, "a", 3]
◦ Starts from index 0
◦ Operations: append, add, delete, index
Python 101
DATA TYPES
◦ Tuples
◦ Same structure like a list
◦ Difference is that values cannot be change
◦ Ex: Months = ("Jan", "Feb", …, "Dec")
Python 101
DATA TYPES
◦ Dictionaries
◦ Look-up tables
◦ Maps a value to a key
◦ Duplicate keys are not allowed, instead we can have duplicate values
◦ User_Ages = {"Sabu":30, "Radel":78, "Sighi":18}
◦ Keys are immutable strings, values, tuples
Python 101
CHOICES AND DECISIONS
◦ Conditional statements
◦ !=, <, <=, >, >=, ==
◦ Logical operators: and, or, not
◦ If statement
If condition_true:
do A
elseif:
do B
elseif:
do C
else
do SomethingElse
Python 101
CHOICES AND DECISIONS
◦ For loops
◦ Looping through an iterable
◦ Iterabile: everything we can loop over: collection, string, tuples
◦ We can loop through a sequence of numbers
food = ["ciorba de fasole", "ceafa", "cartofi prajiti", "clatite"]
for theFood in food:
print (food)
for x in range (5):
print (x)
Python 101
CHOICES AND DECISIONS
◦ While loop
◦ Repeatedly executes instruction inside a loop until a condition is met
◦ While conditions is true, execute things
◦ We can loop inside using break or continue
◦ Try Except
◦ Controls how the program behave when an error occurs
Python 101
FUNCTION
◦ Pre-written code that performs a certain task
◦ Calling it by typing the function name (non OOP) or by dot notation when is part of a
class (OOP)
◦ Can have parameters
◦ Can return a value
QA
Please have mercy … 

More Related Content

What's hot (20)

PDF
Python Developer Certification
Vskills
 
PDF
Why learn python in 2017?
Karolis Ramanauskas
 
PDF
Rust + python: lessons learnt from building a toy filesystem
ChengHui Weng
 
ODP
Learn python
Kracekumar Ramaraju
 
PDF
The str/bytes nightmare before python2 EOL
Kir Chou
 
PPTX
1901200100000 presentation short term mini project on python
SANTOSHJAISWAL52
 
PDF
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Edureka!
 
PDF
Programming with Python - Adv.
Mosky Liu
 
PDF
Programming with Python - Basic
Mosky Liu
 
PDF
Introduction of python
ShehabAldeenFadelall
 
PDF
Python on Science ? Yes, We can.
Marcel Caraciolo
 
PDF
Oktavia Search Engine - pyconjp2014
Yoshiki Shibukawa
 
PDF
Python Workshop
Saket Choudhary
 
PDF
PyPy London Demo Evening 2013
Carl Friedrich Bolz
 
PDF
IT talk "Python language evolution"
DataArt
 
PPTX
Python
Amgad Muhammad
 
PDF
Lowcode: Redoing NativeBoost Portably
ESUG
 
PPT
Python @ PiTech - March 2009
tudorprodan
 
PDF
Memory Debugging
Alain Leon
 
PPTX
Performance Enhancement Tips
Tim (文昌)
 
Python Developer Certification
Vskills
 
Why learn python in 2017?
Karolis Ramanauskas
 
Rust + python: lessons learnt from building a toy filesystem
ChengHui Weng
 
Learn python
Kracekumar Ramaraju
 
The str/bytes nightmare before python2 EOL
Kir Chou
 
1901200100000 presentation short term mini project on python
SANTOSHJAISWAL52
 
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Edureka!
 
Programming with Python - Adv.
Mosky Liu
 
Programming with Python - Basic
Mosky Liu
 
Introduction of python
ShehabAldeenFadelall
 
Python on Science ? Yes, We can.
Marcel Caraciolo
 
Oktavia Search Engine - pyconjp2014
Yoshiki Shibukawa
 
Python Workshop
Saket Choudhary
 
PyPy London Demo Evening 2013
Carl Friedrich Bolz
 
IT talk "Python language evolution"
DataArt
 
Lowcode: Redoing NativeBoost Portably
ESUG
 
Python @ PiTech - March 2009
tudorprodan
 
Memory Debugging
Alain Leon
 
Performance Enhancement Tips
Tim (文昌)
 

Viewers also liked (10)

PDF
Introduction to python programming
Kiran Vadakkath
 
PPTX
Seeing with Python presented at PyCon AU 2014
Mark Rees
 
PDF
MartinezMarjorie-DevCon Summit Certificate of Participation
Marjorie Martinez
 
PPTX
DevCon Summit 2016
Neil Alwin Hermosilla
 
PDF
Android Trends @ DevCon Summit 2016
AppCoins
 
PPTX
Open cv with processing
cjoeltorres
 
PPTX
Django vs Flask
Rachel Sanders
 
PDF
Google Bigtable Paper Presentation
vanjakom
 
ODP
Django와 flask
Jiho Lee
 
PDF
Annabel Lee
bmtravis
 
Introduction to python programming
Kiran Vadakkath
 
Seeing with Python presented at PyCon AU 2014
Mark Rees
 
MartinezMarjorie-DevCon Summit Certificate of Participation
Marjorie Martinez
 
DevCon Summit 2016
Neil Alwin Hermosilla
 
Android Trends @ DevCon Summit 2016
AppCoins
 
Open cv with processing
cjoeltorres
 
Django vs Flask
Rachel Sanders
 
Google Bigtable Paper Presentation
vanjakom
 
Django와 flask
Jiho Lee
 
Annabel Lee
bmtravis
 
Ad

Similar to Introduction to Python (20)

PDF
ppt_pspp.pdf
ShereenAhmedMohamed
 
PPTX
Python Introduction
Punithavel Ramani
 
PDF
Sessisgytcfgggggggggggggggggggggggggggggggg
pawankamal3
 
PDF
web programming Unit VIII complete about python by Bhavsingh Maloth
Bhavsingh Maloth
 
PDF
Python: An introduction A summer workshop
ForrayFerenc
 
PPTX
Introduction to Python Programming Language
merlinjohnsy
 
PPTX
IoT-Week1-Day1-Lab.pptx
afsheenfaiq2
 
PPTX
Python Programming 1.pptx
Francis Densil Raj
 
PPTX
Python Seminar PPT
Shivam Gupta
 
PPTX
Python
Shivam Gupta
 
PPT
Python tutorialfeb152012
Shani729
 
PPTX
python presntation 2.pptx
Arpittripathi45
 
PPTX
Python programming basic Presentation.pptx
pprince22982
 
PDF
python-160403194316.pdf
gmadhu8
 
PDF
First Steps in Python Programming
Dozie Agbo
 
ODP
An Intro to Python in 30 minutes
Sumit Raj
 
PDF
Python Programming
Saravanan T.M
 
PPTX
Python Demo.pptx
ParveenShaik21
 
PPTX
Python.pptx
AshaS74
 
PDF
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
ppt_pspp.pdf
ShereenAhmedMohamed
 
Python Introduction
Punithavel Ramani
 
Sessisgytcfgggggggggggggggggggggggggggggggg
pawankamal3
 
web programming Unit VIII complete about python by Bhavsingh Maloth
Bhavsingh Maloth
 
Python: An introduction A summer workshop
ForrayFerenc
 
Introduction to Python Programming Language
merlinjohnsy
 
IoT-Week1-Day1-Lab.pptx
afsheenfaiq2
 
Python Programming 1.pptx
Francis Densil Raj
 
Python Seminar PPT
Shivam Gupta
 
Python
Shivam Gupta
 
Python tutorialfeb152012
Shani729
 
python presntation 2.pptx
Arpittripathi45
 
Python programming basic Presentation.pptx
pprince22982
 
python-160403194316.pdf
gmadhu8
 
First Steps in Python Programming
Dozie Agbo
 
An Intro to Python in 30 minutes
Sumit Raj
 
Python Programming
Saravanan T.M
 
Python Demo.pptx
ParveenShaik21
 
Python.pptx
AshaS74
 
web programming UNIT VIII python by Bhavsingh Maloth
Bhavsingh Maloth
 
Ad

Recently uploaded (20)

PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PPTX
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PPTX
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
PDF
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
Build It, Buy It, or Already Got It? Make Smarter Martech Decisions
bbedford2
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Change Common Properties in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
The 5 Reasons for IT Maintenance - Arna Softech
Arna Softech
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Help for Correlations in IBM SPSS Statistics.pptx
Version 1 Analytics
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
Digger Solo: Semantic search and maps for your local files
seanpedersen96
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Tally software_Introduction_Presentation
AditiBansal54083
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
Agentic Automation Journey Series Day 2 – Prompt Engineering for UiPath Agents
klpathrudu
 
Top Agile Project Management Tools for Teams in 2025
Orangescrum
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 

Introduction to Python

  • 1. Introduction to Python BOGDAN SABAU 6 JUNE 2015, SOFTVISION
  • 2. Agenda ◦ About me ◦ What is Python ◦ Why use Python ◦ Python 101 ◦ QA
  • 4. What is Python oWidely used high-level programming language oCreated in Netherlands by Guido van Rossum at the end of the 80s oNamed after Monthy Python oStrong emphasizes on code readability and simplicity oSupports multiple programming paradigms oNOT A SNAKE!
  • 5. What is Python oWidely used high-level programming language oCreated in Netherlands by Guido van Rossum at the end of the 80s oNamed after Monthy Python oStrong emphasizes on code readability and simplicity oSupports multiple programming paradigms oNOT A SNAKE!
  • 6. Why use Python oSimplicity oFewer lines => less buggy code and reduce development time o3rd party resources oAvailable on multiple OS oOpen source and mature oUsed by: Google, Dropbox, Eventbrite, Quora, SlideShare, Reedit
  • 7. Python 101 oTwo main versions: 2.x and 3.x oIDE: IDLE, PyDev, PyCharm, Visual Studio oOnline jupyter.org oINDENTATION COUNTS!
  • 8. Python 101 VARIABLES ◦ Must have an initial value ◦ We can define multiple variables at once ◦ Case sensitive ◦ Can contain letter, number or underscore ◦ Some reserved word cannot be used
  • 9. Python 101 OPERATIONS ◦ Addition (+) ◦ Subtraction (-) ◦ Multiplication (*) ◦ Division (/) ◦ Floor division (//) ◦ Modulus (%) ◦ Exponent (**)
  • 10. Python 101 DATA TYPES ◦ Integers ◦ 23, -4, 99934 ◦ Float ◦ 0.333, -8.8, 883.009 ◦ String ◦ “Hola Buenes", ‘Arturo Maran’ ◦ Value of index cannot be changed!
  • 11. Python 101 DATA TYPES ◦ Lists ◦ Compound data types ◦ Normally related but can have different types into them ◦ Alist = [1, 3, 4, 5] ◦ Blist = [1, "a", 3] ◦ Starts from index 0 ◦ Operations: append, add, delete, index
  • 12. Python 101 DATA TYPES ◦ Tuples ◦ Same structure like a list ◦ Difference is that values cannot be change ◦ Ex: Months = ("Jan", "Feb", …, "Dec")
  • 13. Python 101 DATA TYPES ◦ Dictionaries ◦ Look-up tables ◦ Maps a value to a key ◦ Duplicate keys are not allowed, instead we can have duplicate values ◦ User_Ages = {"Sabu":30, "Radel":78, "Sighi":18} ◦ Keys are immutable strings, values, tuples
  • 14. Python 101 CHOICES AND DECISIONS ◦ Conditional statements ◦ !=, <, <=, >, >=, == ◦ Logical operators: and, or, not ◦ If statement If condition_true: do A elseif: do B elseif: do C else do SomethingElse
  • 15. Python 101 CHOICES AND DECISIONS ◦ For loops ◦ Looping through an iterable ◦ Iterabile: everything we can loop over: collection, string, tuples ◦ We can loop through a sequence of numbers food = ["ciorba de fasole", "ceafa", "cartofi prajiti", "clatite"] for theFood in food: print (food) for x in range (5): print (x)
  • 16. Python 101 CHOICES AND DECISIONS ◦ While loop ◦ Repeatedly executes instruction inside a loop until a condition is met ◦ While conditions is true, execute things ◦ We can loop inside using break or continue ◦ Try Except ◦ Controls how the program behave when an error occurs
  • 17. Python 101 FUNCTION ◦ Pre-written code that performs a certain task ◦ Calling it by typing the function name (non OOP) or by dot notation when is part of a class (OOP) ◦ Can have parameters ◦ Can return a value