SlideShare a Scribd company logo
INTRODUCTION
TO
PYTHON
Session-1
** python
□
□
□
□
□
□
□
□
□
Agenda
What is Python...?
Differences between program and scripting language
History of Python
Scope of Python
Why do people use Python?
Installing Python IDE Who
uses python today What
can I do with python A
Sample Code Python code
execution Running Python
What is Python...?
Python is a general purpose programming language that is
often applied in scripting roles.
So, Python is programming language as well as scripting
language.
Python is also called as Interpreted language
Differences between program and
scripting language
□
□
Program
a program is executed (i.e.
the source is first compiled,
and the result of that
compilation is expected)
A "program" in general, is a
sequence of instructions
written so that a computer
can perform certain task.
□
□
Scripting
a script is interpreted
A "script" is code written in
a scripting language. A
scripting language is nothing
but a type of programming
language in which we can
write code to control
another software application.
History
Invented in the Netherlands, early 90s by Guido van Rossum
Python was conceived in the late 1980s and its implementation
was started in December 1989
Guido Van Rossum is fan of ‘Monty Python’s Flying Circus’,
this is a famous TV show in Netherlands
Named after Monty Python
Open sourced from the beginning
Python s Benevolent Dictator For Life
“Python is an experiment in how much
freedom program-mers need. Too much
freedom and nobody can read another's
code; too little and expressive-ness is
endangered.”
- Guido van Rossum
Why was python created?
"My original motivation for creating Python was the
perceived need for a higher level language in the Amoeba
[Operating Systems] project.
I realized that the development of system
administration utilities in C was taking too long. Moreover,
doing these things in the Bourne shell wouldn't work for a
variety of reasons. ...
So, there was a need for a language that would
bridge the gap between C and the shell”
- Guido Van Rossum
Scope of Python
Science
- Bioinformatics System
Administration -Unix -Web
logic -Web sphere
Web Application Development
-CGI
-Jython - Servlets Testing
scripts
Why do people use Python...?
The following primary factors cited by Python users seem to be
these:
□ Python is object-oriented
Structure supports such concepts as polymorphism, operation
overloading, and multiple inheritance.
□ Indentation
Indentation is one of the greatest future in Python.
□ It’s free (open source)
Downloading and installing Python is free and easy Source code
is easily accessible
□ It's powerful
- Dynamic typing
- Built-in types and tools
- Library utilities
- Third party utilities (e.g. Numeric, NumPy, SciPy)
- Automatic memory management
□ It's portable
- Python runs virtually every major platform used today
- As long as you have a compatible Python interpreter
installed,
Python programs will run in exactly the same manner,
□ It’s mixable
- Python can be linked to components written in other languages easily
- Linking to fast, compiled code is useful to computationally intensive
problems
- - Python/C integration is quite common
□ It’s easy to use
- No intermediate compile and link steps as in C/ C++
- Python programs are compiled automatically to an intermediate form
called bytecode, which the interpreter then reads
- This gives Python the development speed of an interpreter without the
performance loss inherent in purely interpreted languages
□ It’s easy to learn
- Structure and syntax are pretty intuitive and easy to grasp
Installing Python
Python is pre-installed on most Unix systems, including
Linux and MAC OS X
But for in Windows Operating Systems , user can
download from the https://www.python.org/downloads/
- from the above link download latest version of python
IDE and install, recent version is 3.4.1 but most of them
uses version 2.7.7 only
□ After installing the Python
Ver#2.7.7, go to start menu
then click on python 2.7 in that
one you can select python
(command line) it is prompt
with »>
iTunes
Lenovo
Maintenance
Memeo
Microsoft Office Microsoft
Silverlight MyPC Backup
Notepad+ +
00V00 PriceMeter Privacy
SafeGuard Protected Search
Python 2.7 r* IDLE (Python
GUI)
** Module Docs ^ Python
(command line) Python
Manuals j§l Uninstall Python
Resolver 2.2 Skype
SmileysWeLove for IE
Computer Control
Panel Devices and
Printei Default
Programs Help and
Support
i Back
Search programs and files
1 © f £
Who uses python today...
Python is being applied in real revenue-generating products by
real companies. For instance:
Google makes extensive use of Python in its web search system,
and employs Python’s creator.
Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM
use Python for hardware testing.
ESRI uses Python as an end-user customization tool for its
popular GIS mapping products.
The YouTube video sharing service is largely written in Python
What can I do with Python...?
System programming
Graphical User Interface Programming
Internet Scripting
Component Integration
Database Programming
Gaming, Images, XML , Robot and more
A Sample Code
x = 34 - 23 # A comment.
y = “Hello” # Another one.
z = 3.45
if z == 3.45 or y == “Hello”: x = x + 1
y = y + “ World” # String concat. print
x print y
Enough to understand the code
Indentation matters to code meaning
- Block structure indicated by indentation First assignment
to a variable creates it
- Variable types don’t need to be declared.
- Python figures out the variable types on its own.
Assignment is = and comparison is ==
For numbers + - * / % are as expected
- Special use of + for string concatenation and % for string
formatting (as in C’s printf)
Logical operators are words (and, or, not) not symbols
The basic printing command is print
Python Code Execution
Python’s traditional runtime execution model: source code you type
is translated to byte code, which is then run by the Python Virtual
Machine. Your code is automatically compiled, but then it is
interpreted.
Source Bytecode Runtime
Source code extension is .py Byte code extension is
.pyc (compiled python code)
Running Python
Once you’re inside the Python interpreter, type in commands at will. •
Examples:
>>> print ’Hello world’
Hello world
# Relevant output is displayed on subsequent lines without the >>>
symbol
>>> x = [0,1,2]
# Quantities stored in memory are not displayed by default
>>> x
# If a quantity is stored in memory, typing its name will display it [0,1,2]
>>> 2+3 5

More Related Content

What's hot (20)

PPTX
Python programming
Ashwin Kumar Ramasamy
 
PDF
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
Edureka!
 
PPTX
Introduction to-python
Aakashdata
 
PPTX
Python in 30 minutes!
Fariz Darari
 
PPTX
Introduction to python
AnirudhaGaikwad4
 
PPTX
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Maulik Borsaniya
 
PPTX
Python
Aashish Jain
 
PPT
Python ppt
Mohita Pandey
 
PPTX
Python Basics
primeteacher32
 
PPT
Python Programming Language
Dr.YNM
 
PPTX
Python programming | Fundamentals of Python programming
KrishnaMildain
 
PDF
Introduction to python
Agung Wahyudi
 
PPTX
Basics of python
SurjeetSinghSurjeetS
 
PPT
Introduction to Python
Nowell Strite
 
PPTX
Python basics
Jyoti shukla
 
PPTX
Presentation on python
william john
 
PPTX
Python ppt
Anush verma
 
PPTX
Introduction to the basics of Python programming (part 1)
Pedro Rodrigues
 
Python programming
Ashwin Kumar Ramasamy
 
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
Edureka!
 
Introduction to-python
Aakashdata
 
Python in 30 minutes!
Fariz Darari
 
Introduction to python
AnirudhaGaikwad4
 
Chapter 1 - INTRODUCTION TO PYTHON -MAULIK BORSANIYA
Maulik Borsaniya
 
Python
Aashish Jain
 
Python ppt
Mohita Pandey
 
Python Basics
primeteacher32
 
Python Programming Language
Dr.YNM
 
Python programming | Fundamentals of Python programming
KrishnaMildain
 
Introduction to python
Agung Wahyudi
 
Basics of python
SurjeetSinghSurjeetS
 
Introduction to Python
Nowell Strite
 
Python basics
Jyoti shukla
 
Presentation on python
william john
 
Python ppt
Anush verma
 
Introduction to the basics of Python programming (part 1)
Pedro Rodrigues
 

Similar to Python tutorial for beginners - Tib academy (20)

PPTX
Introduction to python for Beginners
Sujith Kumar
 
PPTX
Python Tutorial | Python Programming Language
anaveenkumar4
 
PDF
intro.pptx (1).pdf
ANIKULSAIKH
 
PPTX
introduction to python in computer graphics.pptx
urvashipundir04
 
PPTX
python programminig and introduction.pptx
urvashipundir04
 
PPTX
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
PPT
Python programming-2-2048 (30 files merged).ppt
pprince22982
 
PPT
Python programming notes all in one python ppt
pprince22982
 
PPTX
Python is a high-level, interpreted programming language that emphasizes read...
bikomaster9459
 
PPTX
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
PPTX
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
PPTX
Chapter 2: Basics of programming pyton programming
biniyamtiktok
 
PDF
python-160403194316.pdf
gmadhu8
 
PPTX
Python Seminar PPT
Shivam Gupta
 
PPTX
Python
Shivam Gupta
 
PDF
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
Sana Khan
 
PPTX
python presentation
VaibhavMawal
 
PPTX
Python presentation by Monu Sharma
Mayank Sharma
 
PPTX
cupdf.com_python-seminar-ppt.pptx.........
ansuljoshi8456
 
PPTX
Chapter - 1.pptx
MikialeTesfamariam
 
Introduction to python for Beginners
Sujith Kumar
 
Python Tutorial | Python Programming Language
anaveenkumar4
 
intro.pptx (1).pdf
ANIKULSAIKH
 
introduction to python in computer graphics.pptx
urvashipundir04
 
python programminig and introduction.pptx
urvashipundir04
 
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
Python programming-2-2048 (30 files merged).ppt
pprince22982
 
Python programming notes all in one python ppt
pprince22982
 
Python is a high-level, interpreted programming language that emphasizes read...
bikomaster9459
 
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
Chapter 2: Basics of programming pyton programming
biniyamtiktok
 
python-160403194316.pdf
gmadhu8
 
Python Seminar PPT
Shivam Gupta
 
Python
Shivam Gupta
 
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
Sana Khan
 
python presentation
VaibhavMawal
 
Python presentation by Monu Sharma
Mayank Sharma
 
cupdf.com_python-seminar-ppt.pptx.........
ansuljoshi8456
 
Chapter - 1.pptx
MikialeTesfamariam
 
Ad

More from TIB Academy (17)

PPTX
Msbi
TIB Academy
 
PPTX
Ios operating system
TIB Academy
 
PPTX
Salesforce
TIB Academy
 
PPTX
CCNA Introducing
TIB Academy
 
PPTX
Hadoop training in bangalore
TIB Academy
 
PPTX
CCNA Introducing
TIB Academy
 
PPTX
Hadoop tutorial for Freshers,
TIB Academy
 
PPTX
Hadoop training
TIB Academy
 
PPTX
Selenium institute in bangalore
TIB Academy
 
PPTX
Selenium Tutorial for Beginners - TIB Academy
TIB Academy
 
PPTX
Django framework
TIB Academy
 
PPTX
Python basics
TIB Academy
 
PPTX
Core java tutorials
TIB Academy
 
PPTX
Spring tutorials
TIB Academy
 
PPTX
78
TIB Academy
 
PPTX
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
TIB Academy
 
PPTX
Best Angularjs tutorial for beginners - TIB Academy
TIB Academy
 
Ios operating system
TIB Academy
 
Salesforce
TIB Academy
 
CCNA Introducing
TIB Academy
 
Hadoop training in bangalore
TIB Academy
 
CCNA Introducing
TIB Academy
 
Hadoop tutorial for Freshers,
TIB Academy
 
Hadoop training
TIB Academy
 
Selenium institute in bangalore
TIB Academy
 
Selenium Tutorial for Beginners - TIB Academy
TIB Academy
 
Django framework
TIB Academy
 
Python basics
TIB Academy
 
Core java tutorials
TIB Academy
 
Spring tutorials
TIB Academy
 
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
TIB Academy
 
Best Angularjs tutorial for beginners - TIB Academy
TIB Academy
 
Ad

Recently uploaded (20)

PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PPTX
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
PPTX
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PPTX
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
PPTX
Controller Request and Response in Odoo18
Celine George
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
TRANSLATIONAL AND ROTATIONAL MOTION.pptx
KIPAIZAGABAWA1
 
EDUCATIONAL MEDIA/ TEACHING AUDIO VISUAL AIDS
Sonali Gupta
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
How to Create a Customer From Website in Odoo 18.pptx
Celine George
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
grade 5 lesson matatag ENGLISH 5_Q1_PPT_WEEK4.pptx
SireQuinn
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
HUMAN RESOURCE MANAGEMENT: RECRUITMENT, SELECTION, PLACEMENT, DEPLOYMENT, TRA...
PRADEEP ABOTHU
 
Controller Request and Response in Odoo18
Celine George
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 

Python tutorial for beginners - Tib academy

  • 2. □ □ □ □ □ □ □ □ □ Agenda What is Python...? Differences between program and scripting language History of Python Scope of Python Why do people use Python? Installing Python IDE Who uses python today What can I do with python A Sample Code Python code execution Running Python
  • 3. What is Python...? Python is a general purpose programming language that is often applied in scripting roles. So, Python is programming language as well as scripting language. Python is also called as Interpreted language
  • 4. Differences between program and scripting language □ □ Program a program is executed (i.e. the source is first compiled, and the result of that compilation is expected) A "program" in general, is a sequence of instructions written so that a computer can perform certain task. □ □ Scripting a script is interpreted A "script" is code written in a scripting language. A scripting language is nothing but a type of programming language in which we can write code to control another software application.
  • 5. History Invented in the Netherlands, early 90s by Guido van Rossum Python was conceived in the late 1980s and its implementation was started in December 1989 Guido Van Rossum is fan of ‘Monty Python’s Flying Circus’, this is a famous TV show in Netherlands Named after Monty Python Open sourced from the beginning
  • 6. Python s Benevolent Dictator For Life “Python is an experiment in how much freedom program-mers need. Too much freedom and nobody can read another's code; too little and expressive-ness is endangered.” - Guido van Rossum
  • 7. Why was python created? "My original motivation for creating Python was the perceived need for a higher level language in the Amoeba [Operating Systems] project. I realized that the development of system administration utilities in C was taking too long. Moreover, doing these things in the Bourne shell wouldn't work for a variety of reasons. ... So, there was a need for a language that would bridge the gap between C and the shell” - Guido Van Rossum
  • 8. Scope of Python Science - Bioinformatics System Administration -Unix -Web logic -Web sphere Web Application Development -CGI -Jython - Servlets Testing scripts
  • 9. Why do people use Python...? The following primary factors cited by Python users seem to be these: □ Python is object-oriented Structure supports such concepts as polymorphism, operation overloading, and multiple inheritance. □ Indentation Indentation is one of the greatest future in Python. □ It’s free (open source) Downloading and installing Python is free and easy Source code is easily accessible
  • 10. □ It's powerful - Dynamic typing - Built-in types and tools - Library utilities - Third party utilities (e.g. Numeric, NumPy, SciPy) - Automatic memory management □ It's portable - Python runs virtually every major platform used today - As long as you have a compatible Python interpreter installed, Python programs will run in exactly the same manner,
  • 11. □ It’s mixable - Python can be linked to components written in other languages easily - Linking to fast, compiled code is useful to computationally intensive problems - - Python/C integration is quite common □ It’s easy to use - No intermediate compile and link steps as in C/ C++ - Python programs are compiled automatically to an intermediate form called bytecode, which the interpreter then reads - This gives Python the development speed of an interpreter without the performance loss inherent in purely interpreted languages □ It’s easy to learn - Structure and syntax are pretty intuitive and easy to grasp
  • 12. Installing Python Python is pre-installed on most Unix systems, including Linux and MAC OS X But for in Windows Operating Systems , user can download from the https://www.python.org/downloads/ - from the above link download latest version of python IDE and install, recent version is 3.4.1 but most of them uses version 2.7.7 only
  • 13. □ After installing the Python Ver#2.7.7, go to start menu then click on python 2.7 in that one you can select python (command line) it is prompt with »>
  • 14. iTunes Lenovo Maintenance Memeo Microsoft Office Microsoft Silverlight MyPC Backup Notepad+ + 00V00 PriceMeter Privacy SafeGuard Protected Search Python 2.7 r* IDLE (Python GUI) ** Module Docs ^ Python (command line) Python Manuals j§l Uninstall Python Resolver 2.2 Skype SmileysWeLove for IE Computer Control Panel Devices and Printei Default Programs Help and Support i Back Search programs and files 1 © f £
  • 15. Who uses python today... Python is being applied in real revenue-generating products by real companies. For instance: Google makes extensive use of Python in its web search system, and employs Python’s creator. Intel, Cisco, Hewlett-Packard, Seagate, Qualcomm, and IBM use Python for hardware testing. ESRI uses Python as an end-user customization tool for its popular GIS mapping products. The YouTube video sharing service is largely written in Python
  • 16. What can I do with Python...? System programming Graphical User Interface Programming Internet Scripting Component Integration Database Programming Gaming, Images, XML , Robot and more
  • 17. A Sample Code x = 34 - 23 # A comment. y = “Hello” # Another one. z = 3.45 if z == 3.45 or y == “Hello”: x = x + 1 y = y + “ World” # String concat. print x print y
  • 18. Enough to understand the code Indentation matters to code meaning - Block structure indicated by indentation First assignment to a variable creates it - Variable types don’t need to be declared. - Python figures out the variable types on its own. Assignment is = and comparison is == For numbers + - * / % are as expected - Special use of + for string concatenation and % for string formatting (as in C’s printf) Logical operators are words (and, or, not) not symbols The basic printing command is print
  • 19. Python Code Execution Python’s traditional runtime execution model: source code you type is translated to byte code, which is then run by the Python Virtual Machine. Your code is automatically compiled, but then it is interpreted. Source Bytecode Runtime Source code extension is .py Byte code extension is .pyc (compiled python code)
  • 20. Running Python Once you’re inside the Python interpreter, type in commands at will. • Examples: >>> print ’Hello world’ Hello world # Relevant output is displayed on subsequent lines without the >>> symbol >>> x = [0,1,2] # Quantities stored in memory are not displayed by default >>> x # If a quantity is stored in memory, typing its name will display it [0,1,2] >>> 2+3 5