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

Python Developer Certification
Python Developer CertificationPython Developer Certification
Python Developer CertificationVskills
 
Rust + python: lessons learnt from building a toy filesystem
Rust + python: lessons learnt from building a toy filesystemRust + python: lessons learnt from building a toy filesystem
Rust + python: lessons learnt from building a toy filesystemChengHui Weng
 
The str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOLThe str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOLKir Chou
 
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on pythonSANTOSHJAISWAL52
 
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...Edureka!
 
Programming with Python - Adv.
Programming with Python - Adv.Programming with Python - Adv.
Programming with Python - Adv.Mosky Liu
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - BasicMosky Liu
 
Python on Science ? Yes, We can.
Python on Science ?   Yes, We can.Python on Science ?   Yes, We can.
Python on Science ? Yes, We can.Marcel Caraciolo
 
Oktavia Search Engine - pyconjp2014
Oktavia Search Engine - pyconjp2014Oktavia Search Engine - pyconjp2014
Oktavia Search Engine - pyconjp2014Yoshiki Shibukawa
 
IT talk "Python language evolution"
IT talk "Python language evolution"IT talk "Python language evolution"
IT talk "Python language evolution"DataArt
 
Lowcode: Redoing NativeBoost Portably
Lowcode: Redoing NativeBoost PortablyLowcode: Redoing NativeBoost Portably
Lowcode: Redoing NativeBoost PortablyESUG
 
Python @ PiTech - March 2009
Python @ PiTech - March 2009Python @ PiTech - March 2009
Python @ PiTech - March 2009tudorprodan
 
Memory Debugging
Memory DebuggingMemory Debugging
Memory DebuggingAlain Leon
 
Performance Enhancement Tips
Performance Enhancement TipsPerformance Enhancement Tips
Performance Enhancement TipsTim (文昌)
 

What's hot (20)

Python Developer Certification
Python Developer CertificationPython Developer Certification
Python Developer Certification
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
 
Rust + python: lessons learnt from building a toy filesystem
Rust + python: lessons learnt from building a toy filesystemRust + python: lessons learnt from building a toy filesystem
Rust + python: lessons learnt from building a toy filesystem
 
Learn python
Learn pythonLearn python
Learn python
 
The str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOLThe str/bytes nightmare before python2 EOL
The str/bytes nightmare before python2 EOL
 
1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python1901200100000 presentation short term mini project on python
1901200100000 presentation short term mini project on python
 
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
Python Scripting Tutorial for Beginners | Python Tutorial | Python Training |...
 
Programming with Python - Adv.
Programming with Python - Adv.Programming with Python - Adv.
Programming with Python - Adv.
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - Basic
 
Introduction of python
Introduction of pythonIntroduction of python
Introduction of python
 
Python on Science ? Yes, We can.
Python on Science ?   Yes, We can.Python on Science ?   Yes, We can.
Python on Science ? Yes, We can.
 
Oktavia Search Engine - pyconjp2014
Oktavia Search Engine - pyconjp2014Oktavia Search Engine - pyconjp2014
Oktavia Search Engine - pyconjp2014
 
Python Workshop
Python WorkshopPython Workshop
Python Workshop
 
PyPy London Demo Evening 2013
PyPy London Demo Evening 2013PyPy London Demo Evening 2013
PyPy London Demo Evening 2013
 
IT talk "Python language evolution"
IT talk "Python language evolution"IT talk "Python language evolution"
IT talk "Python language evolution"
 
Python
PythonPython
Python
 
Lowcode: Redoing NativeBoost Portably
Lowcode: Redoing NativeBoost PortablyLowcode: Redoing NativeBoost Portably
Lowcode: Redoing NativeBoost Portably
 
Python @ PiTech - March 2009
Python @ PiTech - March 2009Python @ PiTech - March 2009
Python @ PiTech - March 2009
 
Memory Debugging
Memory DebuggingMemory Debugging
Memory Debugging
 
Performance Enhancement Tips
Performance Enhancement TipsPerformance Enhancement Tips
Performance Enhancement Tips
 

Viewers also liked

Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programmingKiran Vadakkath
 
Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014Mark Rees
 
MartinezMarjorie-DevCon Summit Certificate of Participation
MartinezMarjorie-DevCon Summit Certificate of ParticipationMartinezMarjorie-DevCon Summit Certificate of Participation
MartinezMarjorie-DevCon Summit Certificate of ParticipationMarjorie Martinez
 
Android Trends @ DevCon Summit 2016
Android Trends @ DevCon Summit 2016Android Trends @ DevCon Summit 2016
Android Trends @ DevCon Summit 2016AppCoins
 
Open cv with processing
Open cv with processingOpen cv with processing
Open cv with processingcjoeltorres
 
Google Bigtable Paper Presentation
Google Bigtable Paper PresentationGoogle Bigtable Paper Presentation
Google Bigtable Paper Presentationvanjakom
 
Django와 flask
Django와 flaskDjango와 flask
Django와 flaskJiho Lee
 
Annabel Lee
Annabel LeeAnnabel Lee
Annabel Leebmtravis
 

Viewers also liked (10)

Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014Seeing with Python presented at PyCon AU 2014
Seeing with Python presented at PyCon AU 2014
 
MartinezMarjorie-DevCon Summit Certificate of Participation
MartinezMarjorie-DevCon Summit Certificate of ParticipationMartinezMarjorie-DevCon Summit Certificate of Participation
MartinezMarjorie-DevCon Summit Certificate of Participation
 
DevCon Summit 2016
DevCon Summit 2016DevCon Summit 2016
DevCon Summit 2016
 
Android Trends @ DevCon Summit 2016
Android Trends @ DevCon Summit 2016Android Trends @ DevCon Summit 2016
Android Trends @ DevCon Summit 2016
 
Open cv with processing
Open cv with processingOpen cv with processing
Open cv with processing
 
Django vs Flask
Django vs FlaskDjango vs Flask
Django vs Flask
 
Google Bigtable Paper Presentation
Google Bigtable Paper PresentationGoogle Bigtable Paper Presentation
Google Bigtable Paper Presentation
 
Django와 flask
Django와 flaskDjango와 flask
Django와 flask
 
Annabel Lee
Annabel LeeAnnabel Lee
Annabel Lee
 

Similar to Introduction to Python

python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdfgmadhu8
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPTShivam Gupta
 
Python basics_ part1
Python basics_ part1Python basics_ part1
Python basics_ part1Elaf A.Saeed
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptxArpittripathi45
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonAhmed Salama
 
Python for scientific computing
Python for scientific computingPython for scientific computing
Python for scientific computingGo Asgard
 
Python 3 Intro Presentation for NEWLUG
Python 3 Intro Presentation for NEWLUGPython 3 Intro Presentation for NEWLUG
Python 3 Intro Presentation for NEWLUGNEWLUG
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptxGnanesh12
 
200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet Code200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet CodeDavid Danzilio
 
modul-python-part1.pptx
modul-python-part1.pptxmodul-python-part1.pptx
modul-python-part1.pptxYusuf Ayuba
 
Python Novice to Ninja
Python Novice to NinjaPython Novice to Ninja
Python Novice to NinjaAl Sayed Gamal
 

Similar to Introduction to Python (20)

python into.pptx
python into.pptxpython into.pptx
python into.pptx
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
 
python program
python programpython program
python program
 
Python
PythonPython
Python
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
python_class.pptx
python_class.pptxpython_class.pptx
python_class.pptx
 
Python basics_ part1
Python basics_ part1Python basics_ part1
Python basics_ part1
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
bhaskars.pptx
bhaskars.pptxbhaskars.pptx
bhaskars.pptx
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
Python for scientific computing
Python for scientific computingPython for scientific computing
Python for scientific computing
 
Python 3 Intro Presentation for NEWLUG
Python 3 Intro Presentation for NEWLUGPython 3 Intro Presentation for NEWLUG
Python 3 Intro Presentation for NEWLUG
 
Charming python
Charming pythonCharming python
Charming python
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
 
200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet Code200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet Code
 
modul-python-part1.pptx
modul-python-part1.pptxmodul-python-part1.pptx
modul-python-part1.pptx
 
Python Novice to Ninja
Python Novice to NinjaPython Novice to Ninja
Python Novice to Ninja
 
bhaskars.pptx
bhaskars.pptxbhaskars.pptx
bhaskars.pptx
 

Recently uploaded

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfryanfarris8
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfVishalKumarJha10
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfproinshot.com
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...kalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 

Recently uploaded (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

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