SlideShare a Scribd company logo
BASICS OF
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
Difference 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.
Scope of Python
Science
- Bioinformatics.
System Administration
-Unix
-Web logic
-Web sphere
Web Application Development
-CGI
-Jython – Servlets
Testing scripts
What can I do with Python…?
• System
programming.
• Graphical User
Interface
Programming
• Internet Scripting
• Component
Integration
• Database
Programming
• Gaming, Images,
XML , Robot and
more.
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.
 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, irrespective of platform.
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 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
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
THANK YOU

More Related Content

Similar to Python is a high-level, interpreted programming language that emphasizes readability and simplicity, (20)

PPTX
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
PDF
Python Programing Bio computing,basic concepts lab,,
smohana4
 
PPTX
PYTHON FEATURES.pptx
MaheShiva
 
PDF
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
shetoooelshitany74
 
PPT
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
Godwin585235
 
PPT
Python programming-2-2048 (30 files merged).ppt
pprince22982
 
PPT
Python programming notes all in one python ppt
pprince22982
 
PPT
Py-Slides-1.ppt1234444444444444444444444444444444444444444
divijareddy0502
 
PPT
program on python what is python where it was started by whom started
rajkumarmandal9391
 
PPT
Python slides for the beginners to learn
krishna43511
 
PPT
Python Over View (Python for mobile app Devt)1.ppt
AbdurehmanDawud
 
PPT
Py-Slides-1.pptPy-Slides-1.pptPy-Slides-1.pptPy-Slides-1.ppt
v65176016
 
DOCX
Seminar report on python 3 course
HimanshuPanwar38
 
PDF
python-160403194316.pdf
gmadhu8
 
PPTX
Python Seminar PPT
Shivam Gupta
 
PPTX
Python
Shivam Gupta
 
PPTX
Python programming language introduction unit
michaelaaron25322
 
PDF
Python Programming Part 1.pdf
percivalfernandez2
 
PDF
Python Programming Part 1.pdf
percivalfernandez2
 
PDF
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
Sana Khan
 
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
Python Programing Bio computing,basic concepts lab,,
smohana4
 
PYTHON FEATURES.pptx
MaheShiva
 
Py-Slides- easuajsjsjejejjwlqpqpqpp1.pdf
shetoooelshitany74
 
notwa dfdfvs gf fdgfgh s thgfgh frg reggg
Godwin585235
 
Python programming-2-2048 (30 files merged).ppt
pprince22982
 
Python programming notes all in one python ppt
pprince22982
 
Py-Slides-1.ppt1234444444444444444444444444444444444444444
divijareddy0502
 
program on python what is python where it was started by whom started
rajkumarmandal9391
 
Python slides for the beginners to learn
krishna43511
 
Python Over View (Python for mobile app Devt)1.ppt
AbdurehmanDawud
 
Py-Slides-1.pptPy-Slides-1.pptPy-Slides-1.pptPy-Slides-1.ppt
v65176016
 
Seminar report on python 3 course
HimanshuPanwar38
 
python-160403194316.pdf
gmadhu8
 
Python Seminar PPT
Shivam Gupta
 
Python
Shivam Gupta
 
Python programming language introduction unit
michaelaaron25322
 
Python Programming Part 1.pdf
percivalfernandez2
 
Python Programming Part 1.pdf
percivalfernandez2
 
REPORT ON AUDIT COURSE PYTHON BY SANA 2.pdf
Sana Khan
 

Recently uploaded (20)

PDF
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PPTX
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
PDF
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
Horarios de distribución de agua en julio
pegazohn1978
 
PPTX
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PDF
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
infertility, types,causes, impact, and management
Ritu480198
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
PDF
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
PDF
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
PDF
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Week 2 - Irish Natural Heritage Powerpoint.pdf
swainealan
 
PPT-Q1-WEEK-3-SCIENCE-ERevised Matatag Grade 3.pptx
reijhongidayawan02
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Knee Extensor Mechanism Injuries - Orthopedic Radiologic Imaging
Sean M. Fox
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Horarios de distribución de agua en julio
pegazohn1978
 
DAY 1_QUARTER1 ENGLISH 5 WEEK- PRESENTATION.pptx
BanyMacalintal
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
Exploring the Different Types of Experimental Research
Thelma Villaflores
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
AI-Powered-Visual-Storytelling-for-Nonprofits.pdf
TechSoup
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
infertility, types,causes, impact, and management
Ritu480198
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
care of patient with elimination needs.pptx
Rekhanjali Gupta
 
Reconstruct, Restore, Reimagine: New Perspectives on Stoke Newington’s Histor...
History of Stoke Newington
 
Mahidol_Change_Agent_Note_2025-06-27-29_MUSEF
Tassanee Lerksuthirat
 
The History of Phone Numbers in Stoke Newington by Billy Thomas
History of Stoke Newington
 
Ad

Python is a high-level, interpreted programming language that emphasizes readability and simplicity,

  • 2. 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
  • 3. Difference 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.
  • 4. 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.
  • 5. Scope of Python Science - Bioinformatics. System Administration -Unix -Web logic -Web sphere Web Application Development -CGI -Jython – Servlets Testing scripts
  • 6. What can I do with Python…? • System programming. • Graphical User Interface Programming • Internet Scripting • Component Integration • Database Programming • Gaming, Images, XML , Robot and more.
  • 7. 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.  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, irrespective of platform.
  • 8. 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
  • 9. 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 code extension is .py Byte code extension is .pyc (compiled python code)
  • 10. 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
  • 11. 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