SlideShare a Scribd company logo
BITS Pilani
Pilani Campus
Dhanashree N P
Lecturer (Off-Campus) Computer Science
'Hello, World!' with Python
04-01-2017
DISCLAIMER
This is NOT a Python programming tutorial!!
Session Overview
1. The clichéd title
2. Python & PSF
3. Features of Python
4. Success stories: using Python
5. Sample programs
6. FAQs
7. Python programs are ‘slow’ – Myth?
8. Why is Python preferred by many?
9. Reference Links
The clichéd title
Any programming tutorial starts with a ‘Hello, World!’ program.
Let’s use the same to answer ‘Why Python?’
Python & PSF
• “hobby” programming
project
• Interpreter for a
scripting language
Dec 1989
• Python 2.0 – 16th Oct
• Unicode Support, cycle-
detecting GC
Oct 2000 • Python 3.0
• Backward-Incompatible
• Features backported to
backward compatible
2.7.x, 2.6.x
Dec 2008
Guido van Rossum – creator of Python
– benevolent dictator for life (BDFL)
Python Software Foundation(PSF) - manages the open-source licensing for Python 2.1 and later
- mission is to promote, protect and advance Python; support
and facilitate growth of international & diverse community of Python programmers. [2001]
Python: Features
6
Language
Features
High-
level
General
Purpose
Multi-
Paradigm
Interpreted
Fully
Supported
• Object-oriented Programming
• Structured Programming
Supported
by Language
Features
• Functional Programming
• Aspect Oriented Programming
Supported
by
Extensions
• Design by Contract
• Logic Programming
Python: Features
7
Features
Dynamic
typing
Late
binding
ExtensibleWhite
Spaces
Automatic
Memory
Management
The name Python was inspired from the series Monty Python’s Flying Circus
a = 3
a = “a string”
a = [‘a’, ‘list’]
len(a)
Success Stories using Python
8
Web &
Analysis
• Mozilla
• Google
• Youtube
• Bitly
• ForecastWatch
.com etc
Science,
Energy
•ExpEYES [portable
scientific laboratory]
•VAMPZero [aircraft
conceptual design]
• Eco Mode @ SMS
Siemag AG
• Large Hadron
Collider (CERN)
•EPRI (Life on Mars -
ESA) [Python
powered clusters
and graphics
processing]
Animation &
Graphics
• Blender
• Houdini
Systems
Cloud, Data
Centers etc.
• Open Stack
• Google App
Engine
• Flying Circus
• rackspace
Others
• Scientific &
Numeric
Processing –
SciPy, NumPy
• Machine
Learning &
Analytics –
SocialCorps,
Innoplexus,
Fractal Analysis
• Automation of
applications [
Jython]Oracle
in ODI
A few lines of code..
9
Examples shown use Python 2.7.12
A simple word-count program – Python shell/command line
A simple word-count program using the os module – Python shell/command line
A few more lines of code..
10
Examples shown use Python 2.7.12
Code to check the word count limit for multiple files
Save this code in a file as pgm.py
From the command line (Linux) – execute it using: python pgm.py
Or from within IDLE shell - execfile('pgm.py')
A few FAQs
11
1. What version to choose – 2.7.x or 3.x?
https://wiki.python.org/moin/Python2orPython3
2. What to use for development?
1. Any text editor (from notepad to Sublime Text)
2. IDE (Eric, Pycharm)
3. Online Web Application: Jupyter (iPython)
3. How to run?
1. Use the command line  python filename [arguments]
2. Use the Python shell  execfile(filename[,arguments])
4. How to debug?
pdb module https://docs.python.org/2/library/pdb.html
Is Python ‘slow’ ? Why?
12
Yes – most of the raw code is slower than C/C++. But it is faster
than Ruby/JavaScript [Source: Internet]
A few reasons are:
1. Dynamic v/s Static typing
2. Interpreted v/s Compiled
3. Inefficient memory access due to its object model (list
access)
But there are hacks to overcome these: vectorised operations
[SciPy, NumPy etc.], calling compiled code, using specific
libraries etc.
Read more at: https://jakevdp.github.io/blog/2014/05/09/why-python-is-slow/
Why not something else?
Source: https://www.python.org/about/
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Questions?
Source: https://www.explainxkcd.com/wiki/index.php/353:_Python
BITS Pilani, Pilani Campus
Python – About, Documentation, Downloads etc. - https://www.python.org/
Python Software Foundation - https://www.python.org/psf/
Logos and Usage - https://www.python.org/community/logos/
History and Timelines -
https://en.wikipedia.org/wiki/Python_(programming_language)
Some Success Stories and Case studies -
http://brochure.getpython.info/media/releases/psf-python-brochure-vol.-i-
final-download.pdf/at_download/file
Some Tutorials/Books to start with:
The Python Tutorial https://docs.python.org/3/tutorial/
LearnPython.org http://www.learnpython.org/
Think Python: How to Think Like a Computer Scientist – Allen. B.
Downey http://www.greenteapress.com/thinkpython/html/
Python Playground: Geeky Projects for the curious Programmer –
Mahesh Venkitachalam https://www.nostarch.com/pythonplayground
Reference Links
BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
17

More Related Content

What's hot

Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersBoey Pak Cheong
 
IHTM Python PCEP Introduction to Python
IHTM Python PCEP Introduction to PythonIHTM Python PCEP Introduction to Python
IHTM Python PCEP Introduction to PythonIHTMINSTITUTE
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To PythonVanessa Rene
 
Python for the C# developer
Python for the C# developerPython for the C# developer
Python for the C# developerMichael Kennedy
 
Python 101 For The Net Developer
Python 101 For The Net DeveloperPython 101 For The Net Developer
Python 101 For The Net DeveloperSarah Dutkiewicz
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners Sujith Kumar
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyTIB Academy
 
A commercial open source project in Python
A commercial open source project in PythonA commercial open source project in Python
A commercial open source project in Pythonjbrendel
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Edureka!
 
Python: the Project, the Language and the Style
Python: the Project, the Language and the StylePython: the Project, the Language and the Style
Python: the Project, the Language and the StyleJuan-Manuel Gimeno
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming pptismailmrribi
 
Python programming
Python programmingPython programming
Python programmingMegha V
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET DeveloperSarah Dutkiewicz
 
Writing Fast Code (JP) - PyCon JP 2015
Writing Fast Code (JP) - PyCon JP 2015Writing Fast Code (JP) - PyCon JP 2015
Writing Fast Code (JP) - PyCon JP 2015Younggun Kim
 
Anton Kasyanov, Introduction to Python, Lecture1
Anton Kasyanov, Introduction to Python, Lecture1Anton Kasyanov, Introduction to Python, Lecture1
Anton Kasyanov, Introduction to Python, Lecture1Anton Kasyanov
 

What's hot (20)

Introduction to python
 Introduction to python Introduction to python
Introduction to python
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Python, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for EngineersPython, the Language of Science and Engineering for Engineers
Python, the Language of Science and Engineering for Engineers
 
IHTM Python PCEP Introduction to Python
IHTM Python PCEP Introduction to PythonIHTM Python PCEP Introduction to Python
IHTM Python PCEP Introduction to Python
 
Introduction To Python
Introduction To PythonIntroduction To Python
Introduction To Python
 
Python for the C# developer
Python for the C# developerPython for the C# developer
Python for the C# developer
 
Python 101 For The Net Developer
Python 101 For The Net DeveloperPython 101 For The Net Developer
Python 101 For The Net Developer
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Python Introduction
Python IntroductionPython Introduction
Python Introduction
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
 
A commercial open source project in Python
A commercial open source project in PythonA commercial open source project in Python
A commercial open source project in Python
 
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...Learn Python Programming | Python Programming - Step by Step | Python for Beg...
Learn Python Programming | Python Programming - Step by Step | Python for Beg...
 
Python: the Project, the Language and the Style
Python: the Project, the Language and the StylePython: the Project, the Language and the Style
Python: the Project, the Language and the Style
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Python programming
Python programmingPython programming
Python programming
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET Developer
 
C presentation -python
C presentation -pythonC presentation -python
C presentation -python
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Writing Fast Code (JP) - PyCon JP 2015
Writing Fast Code (JP) - PyCon JP 2015Writing Fast Code (JP) - PyCon JP 2015
Writing Fast Code (JP) - PyCon JP 2015
 
Anton Kasyanov, Introduction to Python, Lecture1
Anton Kasyanov, Introduction to Python, Lecture1Anton Kasyanov, Introduction to Python, Lecture1
Anton Kasyanov, Introduction to Python, Lecture1
 

Viewers also liked

OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersDhanashree Prasad
 
Python Hype June
Python Hype JunePython Hype June
Python Hype JuneBrian Ray
 
James Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on PythonJames Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on PythonCP-Union
 
Python Hype?
Python Hype?Python Hype?
Python Hype?Brian Ray
 
Wellcome to python
Wellcome to pythonWellcome to python
Wellcome to pythonNanra Sukedy
 
Bringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusBringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusCTruncer
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming LanguageDipankar Achinta
 
Building an EmPyre with Python
Building an EmPyre with PythonBuilding an EmPyre with Python
Building an EmPyre with PythonWill Schroeder
 
Introduction about Python by JanBask Training
Introduction about Python by JanBask TrainingIntroduction about Python by JanBask Training
Introduction about Python by JanBask TrainingJanBask Training
 
Presentation of Python, Django, DockerStack
Presentation of Python, Django, DockerStackPresentation of Python, Django, DockerStack
Presentation of Python, Django, DockerStackDavid Sanchez
 
Python and Data Evangelism
Python and Data EvangelismPython and Data Evangelism
Python and Data EvangelismWon Bae Suh
 

Viewers also liked (17)

MPI Tutorial
MPI TutorialMPI Tutorial
MPI Tutorial
 
OpenMP Tutorial for Beginners
OpenMP Tutorial for BeginnersOpenMP Tutorial for Beginners
OpenMP Tutorial for Beginners
 
Python Hype June
Python Hype JunePython Hype June
Python Hype June
 
James Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on PythonJames Jesus Bermas on Crash Course on Python
James Jesus Bermas on Crash Course on Python
 
Pydata-Python tools for webscraping
Pydata-Python tools for webscrapingPydata-Python tools for webscraping
Pydata-Python tools for webscraping
 
Data analysis with pandas
Data analysis with pandasData analysis with pandas
Data analysis with pandas
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Python Hype?
Python Hype?Python Hype?
Python Hype?
 
Wellcome to python
Wellcome to pythonWellcome to python
Wellcome to python
 
Bringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirusBringing Down the House - How One Python Script Ruled Over AntiVirus
Bringing Down the House - How One Python Script Ruled Over AntiVirus
 
Public Outreach - Running an effective campaign
 Public Outreach - Running an effective campaign  Public Outreach - Running an effective campaign
Public Outreach - Running an effective campaign
 
Intro to Python Programming Language
Intro to Python Programming LanguageIntro to Python Programming Language
Intro to Python Programming Language
 
Building an EmPyre with Python
Building an EmPyre with PythonBuilding an EmPyre with Python
Building an EmPyre with Python
 
Introduction about Python by JanBask Training
Introduction about Python by JanBask TrainingIntroduction about Python by JanBask Training
Introduction about Python by JanBask Training
 
Presentation of Python, Django, DockerStack
Presentation of Python, Django, DockerStackPresentation of Python, Django, DockerStack
Presentation of Python, Django, DockerStack
 
Python and Data Evangelism
Python and Data EvangelismPython and Data Evangelism
Python and Data Evangelism
 
Web scraping com python
Web scraping com pythonWeb scraping com python
Web scraping com python
 

Similar to Hello World! with Python

Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfVisionAcademyProfSac
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfVaibhavKumarSinghkal
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfbhagyashri686896
 
Python_final_print_batch_II_vision_academy (1).pdf
Python_final_print_batch_II_vision_academy (1).pdfPython_final_print_batch_II_vision_academy (1).pdf
Python_final_print_batch_II_vision_academy (1).pdfrupaliakhute
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfsannykhopade
 
Python_vision_academy notes
Python_vision_academy notes Python_vision_academy notes
Python_vision_academy notes rajaniraut
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Niraj Bharambe
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)guobichrng
 
PyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsPyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsHenry Schreiner
 
Introduction to Python Programming language.pptx
Introduction to Python Programming language.pptxIntroduction to Python Programming language.pptx
Introduction to Python Programming language.pptxBharathYusha1
 
Python Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PunePython Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PuneEthan's Tech
 
Introduction to Python.pptx
Introduction to Python.pptxIntroduction to Python.pptx
Introduction to Python.pptxSamyakJain461
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python courseEran Shlomo
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialQA TrainingHub
 

Similar to Hello World! with Python (20)

Python_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdfPython_final_print_vison_academy_9822506209.pdf
Python_final_print_vison_academy_9822506209.pdf
 
Introduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdfIntroduction to Python Unit -1 Part .pdf
Introduction to Python Unit -1 Part .pdf
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdf
 
Python_final_print_batch_II_vision_academy (1).pdf
Python_final_print_batch_II_vision_academy (1).pdfPython_final_print_batch_II_vision_academy (1).pdf
Python_final_print_batch_II_vision_academy (1).pdf
 
Python_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdfPython_final_print_batch_II_vision_academy.pdf
Python_final_print_batch_II_vision_academy.pdf
 
Python_vision_academy notes
Python_vision_academy notes Python_vision_academy notes
Python_vision_academy notes
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
PyCon2022 - Building Python Extensions
PyCon2022 - Building Python ExtensionsPyCon2022 - Building Python Extensions
PyCon2022 - Building Python Extensions
 
05 python.pdf
05 python.pdf05 python.pdf
05 python.pdf
 
Introduction to Python Programming language.pptx
Introduction to Python Programming language.pptxIntroduction to Python Programming language.pptx
Introduction to Python Programming language.pptx
 
Python Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech PunePython Training in Pune - Ethans Tech Pune
Python Training in Pune - Ethans Tech Pune
 
Summer Training Project.pdf
Summer Training Project.pdfSummer Training Project.pdf
Summer Training Project.pdf
 
Introduction to Python.pptx
Introduction to Python.pptxIntroduction to Python.pptx
Introduction to Python.pptx
 
PyCourse - Self driving python course
PyCourse - Self driving python coursePyCourse - Self driving python course
PyCourse - Self driving python course
 
Getting Started with Python
Getting Started with PythonGetting Started with Python
Getting Started with Python
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python Tutorial
 
week1.ppt
week1.pptweek1.ppt
week1.ppt
 

Recently uploaded

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowPeter Caitens
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessWSO2
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageGlobus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfAMB-Review
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobus
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfOrtus Solutions, Corp
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion Clinic
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAlluxio, Inc.
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandIES VE
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAlluxio, Inc.
 

Recently uploaded (20)

Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
Abortion ^Clinic ^%[+971588192166''] Abortion Pill Al Ain (?@?) Abortion Pill...
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 

Hello World! with Python

  • 1. BITS Pilani Pilani Campus Dhanashree N P Lecturer (Off-Campus) Computer Science 'Hello, World!' with Python 04-01-2017
  • 2. DISCLAIMER This is NOT a Python programming tutorial!!
  • 3. Session Overview 1. The clichéd title 2. Python & PSF 3. Features of Python 4. Success stories: using Python 5. Sample programs 6. FAQs 7. Python programs are ‘slow’ – Myth? 8. Why is Python preferred by many? 9. Reference Links
  • 4. The clichéd title Any programming tutorial starts with a ‘Hello, World!’ program. Let’s use the same to answer ‘Why Python?’
  • 5. Python & PSF • “hobby” programming project • Interpreter for a scripting language Dec 1989 • Python 2.0 – 16th Oct • Unicode Support, cycle- detecting GC Oct 2000 • Python 3.0 • Backward-Incompatible • Features backported to backward compatible 2.7.x, 2.6.x Dec 2008 Guido van Rossum – creator of Python – benevolent dictator for life (BDFL) Python Software Foundation(PSF) - manages the open-source licensing for Python 2.1 and later - mission is to promote, protect and advance Python; support and facilitate growth of international & diverse community of Python programmers. [2001]
  • 6. Python: Features 6 Language Features High- level General Purpose Multi- Paradigm Interpreted Fully Supported • Object-oriented Programming • Structured Programming Supported by Language Features • Functional Programming • Aspect Oriented Programming Supported by Extensions • Design by Contract • Logic Programming
  • 7. Python: Features 7 Features Dynamic typing Late binding ExtensibleWhite Spaces Automatic Memory Management The name Python was inspired from the series Monty Python’s Flying Circus a = 3 a = “a string” a = [‘a’, ‘list’] len(a)
  • 8. Success Stories using Python 8 Web & Analysis • Mozilla • Google • Youtube • Bitly • ForecastWatch .com etc Science, Energy •ExpEYES [portable scientific laboratory] •VAMPZero [aircraft conceptual design] • Eco Mode @ SMS Siemag AG • Large Hadron Collider (CERN) •EPRI (Life on Mars - ESA) [Python powered clusters and graphics processing] Animation & Graphics • Blender • Houdini Systems Cloud, Data Centers etc. • Open Stack • Google App Engine • Flying Circus • rackspace Others • Scientific & Numeric Processing – SciPy, NumPy • Machine Learning & Analytics – SocialCorps, Innoplexus, Fractal Analysis • Automation of applications [ Jython]Oracle in ODI
  • 9. A few lines of code.. 9 Examples shown use Python 2.7.12 A simple word-count program – Python shell/command line A simple word-count program using the os module – Python shell/command line
  • 10. A few more lines of code.. 10 Examples shown use Python 2.7.12 Code to check the word count limit for multiple files Save this code in a file as pgm.py From the command line (Linux) – execute it using: python pgm.py Or from within IDLE shell - execfile('pgm.py')
  • 11. A few FAQs 11 1. What version to choose – 2.7.x or 3.x? https://wiki.python.org/moin/Python2orPython3 2. What to use for development? 1. Any text editor (from notepad to Sublime Text) 2. IDE (Eric, Pycharm) 3. Online Web Application: Jupyter (iPython) 3. How to run? 1. Use the command line  python filename [arguments] 2. Use the Python shell  execfile(filename[,arguments]) 4. How to debug? pdb module https://docs.python.org/2/library/pdb.html
  • 12. Is Python ‘slow’ ? Why? 12 Yes – most of the raw code is slower than C/C++. But it is faster than Ruby/JavaScript [Source: Internet] A few reasons are: 1. Dynamic v/s Static typing 2. Interpreted v/s Compiled 3. Inefficient memory access due to its object model (list access) But there are hacks to overcome these: vectorised operations [SciPy, NumPy etc.], calling compiled code, using specific libraries etc. Read more at: https://jakevdp.github.io/blog/2014/05/09/why-python-is-slow/
  • 13. Why not something else? Source: https://www.python.org/about/
  • 14. BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 Questions?
  • 16. BITS Pilani, Pilani Campus Python – About, Documentation, Downloads etc. - https://www.python.org/ Python Software Foundation - https://www.python.org/psf/ Logos and Usage - https://www.python.org/community/logos/ History and Timelines - https://en.wikipedia.org/wiki/Python_(programming_language) Some Success Stories and Case studies - http://brochure.getpython.info/media/releases/psf-python-brochure-vol.-i- final-download.pdf/at_download/file Some Tutorials/Books to start with: The Python Tutorial https://docs.python.org/3/tutorial/ LearnPython.org http://www.learnpython.org/ Think Python: How to Think Like a Computer Scientist – Allen. B. Downey http://www.greenteapress.com/thinkpython/html/ Python Playground: Geeky Projects for the curious Programmer – Mahesh Venkitachalam https://www.nostarch.com/pythonplayground Reference Links
  • 17. BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956 17