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

PPTX
Introduction to python for Beginners
Sujith Kumar
 
PDF
intro.pptx (1).pdf
ANIKULSAIKH
 
PPTX
Introduction python
Jumbo Techno e_Learning
 
PPTX
Python Tutorial | Python Programming Language
anaveenkumar4
 
PPTX
Phython Programming Language
R.h. Himel
 
PPTX
python programminig and introduction.pptx
urvashipundir04
 
PPTX
Python tutorial for beginners - Tib academy
TIB Academy
 
PPTX
introduction to python in computer graphics.pptx
urvashipundir04
 
Introduction to python for Beginners
Sujith Kumar
 
intro.pptx (1).pdf
ANIKULSAIKH
 
Introduction python
Jumbo Techno e_Learning
 
Python Tutorial | Python Programming Language
anaveenkumar4
 
Phython Programming Language
R.h. Himel
 
python programminig and introduction.pptx
urvashipundir04
 
Python tutorial for beginners - Tib academy
TIB Academy
 
introduction to python in computer graphics.pptx
urvashipundir04
 

Similar to Python is a high-level, interpreted programming language known for its simplicity and readability. (20)

PPTX
introduction to python in detail including .pptx
urvashipundir04
 
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
 
introduction to python in detail including .pptx
urvashipundir04
 
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
 
Ad

Recently uploaded (20)

PPTX
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
PPTX
How to Manage Global Discount in Odoo 18 POS
Celine George
 
PDF
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
PDF
5.EXPLORING-FORCES-Detailed-Notes.pdf/8TH CLASS SCIENCE CURIOSITY
Sandeep Swamy
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
PDF
7.Particulate-Nature-of-Matter.ppt/8th class science curiosity/by k sandeep s...
Sandeep Swamy
 
PDF
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
PPTX
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PPTX
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
PDF
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
PPTX
Strengthening open access through collaboration: building connections with OP...
Jisc
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PDF
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
PPTX
Understanding operators in c language.pptx
auteharshil95
 
DOCX
UPPER GASTRO INTESTINAL DISORDER.docx
BANDITA PATRA
 
PPTX
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
PPTX
Congenital Hypothyroidism pptx
AneetaSharma15
 
PDF
Landforms and landscapes data surprise preview
jpinnuck
 
CARE OF UNCONSCIOUS PATIENTS .pptx
AneetaSharma15
 
How to Manage Global Discount in Odoo 18 POS
Celine George
 
Arihant Class 10 All in One Maths full pdf
sajal kumar
 
5.EXPLORING-FORCES-Detailed-Notes.pdf/8TH CLASS SCIENCE CURIOSITY
Sandeep Swamy
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
7.Particulate-Nature-of-Matter.ppt/8th class science curiosity/by k sandeep s...
Sandeep Swamy
 
PG-BPSDMP 2 TAHUN 2025PG-BPSDMP 2 TAHUN 2025.pdf
AshifaRamadhani
 
Skill Development Program For Physiotherapy Students by SRY.pptx
Prof.Dr.Y.SHANTHOSHRAJA MPT Orthopedic., MSc Microbiology
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
Types of Literary Text: Poetry and Prose
kaelandreabibit
 
Strengthening open access through collaboration: building connections with OP...
Jisc
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
UTS Health Student Promotional Representative_Position Description.pdf
Faculty of Health, University of Technology Sydney
 
Understanding operators in c language.pptx
auteharshil95
 
UPPER GASTRO INTESTINAL DISORDER.docx
BANDITA PATRA
 
Nursing Management of Patients with Disorders of Ear, Nose, and Throat (ENT) ...
RAKESH SAJJAN
 
Congenital Hypothyroidism pptx
AneetaSharma15
 
Landforms and landscapes data surprise preview
jpinnuck
 
Ad

Python is a high-level, interpreted programming language known for its simplicity and readability.

  • 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