SlideShare a Scribd company logo
Python Tutorial | Python Programming Language
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 V
an 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
Moreover, doing these things in the Bourne
administration utilities in C was taking too long.
shell
wouldn'twork foravarietyof reasons. ...
So, there was a need for a language that
would bridge thegap between C and the shell”
- GuidoVan Rossum
Scope of Python
Science
- Bioinformatics
SystemAdministration
-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,
irrespective of platform.
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 >>>
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 Y
ouTube 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
# A comment.
#Another one.
x = 34 - 23
y = “Hello”
z = 3.45
if z == 3.45 or y == “Hello”:
x = x + 1
# String concat.
y = y + “ World”
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 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
Ad

More Related Content

What's hot (20)

5.1 การวิเคราะห์คุณสมบัติของวัสดุและลักษณะการใช้งาน
5.1 การวิเคราะห์คุณสมบัติของวัสดุและลักษณะการใช้งาน 5.1 การวิเคราะห์คุณสมบัติของวัสดุและลักษณะการใช้งาน
5.1 การวิเคราะห์คุณสมบัติของวัสดุและลักษณะการใช้งาน
TBnakglan
 
ชั้นประถมศึกษาปีที่ 4
ชั้นประถมศึกษาปีที่ 4ชั้นประถมศึกษาปีที่ 4
ชั้นประถมศึกษาปีที่ 4
krunuy5
 
Phases of compiler
Phases of compilerPhases of compiler
Phases of compiler
PANKAJKUMAR2519
 
Present progressive
Present progressivePresent progressive
Present progressive
Promsup
 
สไลด์ ชาวพุทธตัวอย่าง ป.5+483+dltvsocp5+55t2soc p05 f11-1page
สไลด์ ชาวพุทธตัวอย่าง ป.5+483+dltvsocp5+55t2soc p05 f11-1pageสไลด์ ชาวพุทธตัวอย่าง ป.5+483+dltvsocp5+55t2soc p05 f11-1page
สไลด์ ชาวพุทธตัวอย่าง ป.5+483+dltvsocp5+55t2soc p05 f11-1page
Prachoom Rangkasikorn
 
บทที่ 6-การใช้งานเทคโนโลยีสารสนเทศอย่างมีความรับผิดชอบ
บทที่ 6-การใช้งานเทคโนโลยีสารสนเทศอย่างมีความรับผิดชอบบทที่ 6-การใช้งานเทคโนโลยีสารสนเทศอย่างมีความรับผิดชอบ
บทที่ 6-การใช้งานเทคโนโลยีสารสนเทศอย่างมีความรับผิดชอบ
รัสนา สิงหปรีชา
 
ผลกระทบของเหตุการณ์พฤษภาทมิฬที่ส่งผลถึงปัจจุบัน
ผลกระทบของเหตุการณ์พฤษภาทมิฬที่ส่งผลถึงปัจจุบันผลกระทบของเหตุการณ์พฤษภาทมิฬที่ส่งผลถึงปัจจุบัน
ผลกระทบของเหตุการณ์พฤษภาทมิฬที่ส่งผลถึงปัจจุบัน
Sethapong Hamarn
 
Vb decision making statements
Vb decision making statementsVb decision making statements
Vb decision making statements
pragya ratan
 
การเขียนเรียงความ.pdf
การเขียนเรียงความ.pdfการเขียนเรียงความ.pdf
การเขียนเรียงความ.pdf
GREATTEACHERCYBERFOX
 
การพัฒนาแบบฝึกทักษะ เรื่อง การสร้างคำในภาษาไทย เพื่อยกระดับผลสัมฤทธิ์ทางการเรียน
การพัฒนาแบบฝึกทักษะ เรื่อง การสร้างคำในภาษาไทย เพื่อยกระดับผลสัมฤทธิ์ทางการเรียนการพัฒนาแบบฝึกทักษะ เรื่อง การสร้างคำในภาษาไทย เพื่อยกระดับผลสัมฤทธิ์ทางการเรียน
การพัฒนาแบบฝึกทักษะ เรื่อง การสร้างคำในภาษาไทย เพื่อยกระดับผลสัมฤทธิ์ทางการเรียน
Tunggy
 
แบบฝึกทักษะการเขียนเรียงความ
แบบฝึกทักษะการเขียนเรียงความแบบฝึกทักษะการเขียนเรียงความ
แบบฝึกทักษะการเขียนเรียงความ
sripayom
 
บทที่ 2
บทที่ 2 บทที่ 2
บทที่ 2
maerimwittayakom school
 
โครงงานประเภท “การพัฒนาโปรแกรมประยุกต์”
โครงงานประเภท “การพัฒนาโปรแกรมประยุกต์”โครงงานประเภท “การพัฒนาโปรแกรมประยุกต์”
โครงงานประเภท “การพัฒนาโปรแกรมประยุกต์”
Royphim Namsongwong
 
ตัวอย่างโครงงานคอม
ตัวอย่างโครงงานคอมตัวอย่างโครงงานคอม
ตัวอย่างโครงงานคอม
Scott Tape
 
หนังสือเรียนภาษาไทยสำหรับชาวต่างชาติ
หนังสือเรียนภาษาไทยสำหรับชาวต่างชาติหนังสือเรียนภาษาไทยสำหรับชาวต่างชาติ
หนังสือเรียนภาษาไทยสำหรับชาวต่างชาติ
Jarinya Chaiyabin
 
การจัดการเรียนการสอนในยุคดิจิทัล
การจัดการเรียนการสอนในยุคดิจิทัลการจัดการเรียนการสอนในยุคดิจิทัล
การจัดการเรียนการสอนในยุคดิจิทัล
Surapon Boonlue
 
Adobe Flash CS6
 Adobe Flash CS6 Adobe Flash CS6
Adobe Flash CS6
siwaporn_jo
 
เล่มที่ 1present simpletense(new)
เล่มที่ 1present simpletense(new)เล่มที่ 1present simpletense(new)
เล่มที่ 1present simpletense(new)
thestorygu
 
5.1 การวิเคราะห์คุณสมบัติของวัสดุและลักษณะการใช้งาน
5.1 การวิเคราะห์คุณสมบัติของวัสดุและลักษณะการใช้งาน 5.1 การวิเคราะห์คุณสมบัติของวัสดุและลักษณะการใช้งาน
5.1 การวิเคราะห์คุณสมบัติของวัสดุและลักษณะการใช้งาน
TBnakglan
 
ชั้นประถมศึกษาปีที่ 4
ชั้นประถมศึกษาปีที่ 4ชั้นประถมศึกษาปีที่ 4
ชั้นประถมศึกษาปีที่ 4
krunuy5
 
Present progressive
Present progressivePresent progressive
Present progressive
Promsup
 
สไลด์ ชาวพุทธตัวอย่าง ป.5+483+dltvsocp5+55t2soc p05 f11-1page
สไลด์ ชาวพุทธตัวอย่าง ป.5+483+dltvsocp5+55t2soc p05 f11-1pageสไลด์ ชาวพุทธตัวอย่าง ป.5+483+dltvsocp5+55t2soc p05 f11-1page
สไลด์ ชาวพุทธตัวอย่าง ป.5+483+dltvsocp5+55t2soc p05 f11-1page
Prachoom Rangkasikorn
 
บทที่ 6-การใช้งานเทคโนโลยีสารสนเทศอย่างมีความรับผิดชอบ
บทที่ 6-การใช้งานเทคโนโลยีสารสนเทศอย่างมีความรับผิดชอบบทที่ 6-การใช้งานเทคโนโลยีสารสนเทศอย่างมีความรับผิดชอบ
บทที่ 6-การใช้งานเทคโนโลยีสารสนเทศอย่างมีความรับผิดชอบ
รัสนา สิงหปรีชา
 
ผลกระทบของเหตุการณ์พฤษภาทมิฬที่ส่งผลถึงปัจจุบัน
ผลกระทบของเหตุการณ์พฤษภาทมิฬที่ส่งผลถึงปัจจุบันผลกระทบของเหตุการณ์พฤษภาทมิฬที่ส่งผลถึงปัจจุบัน
ผลกระทบของเหตุการณ์พฤษภาทมิฬที่ส่งผลถึงปัจจุบัน
Sethapong Hamarn
 
Vb decision making statements
Vb decision making statementsVb decision making statements
Vb decision making statements
pragya ratan
 
การเขียนเรียงความ.pdf
การเขียนเรียงความ.pdfการเขียนเรียงความ.pdf
การเขียนเรียงความ.pdf
GREATTEACHERCYBERFOX
 
การพัฒนาแบบฝึกทักษะ เรื่อง การสร้างคำในภาษาไทย เพื่อยกระดับผลสัมฤทธิ์ทางการเรียน
การพัฒนาแบบฝึกทักษะ เรื่อง การสร้างคำในภาษาไทย เพื่อยกระดับผลสัมฤทธิ์ทางการเรียนการพัฒนาแบบฝึกทักษะ เรื่อง การสร้างคำในภาษาไทย เพื่อยกระดับผลสัมฤทธิ์ทางการเรียน
การพัฒนาแบบฝึกทักษะ เรื่อง การสร้างคำในภาษาไทย เพื่อยกระดับผลสัมฤทธิ์ทางการเรียน
Tunggy
 
แบบฝึกทักษะการเขียนเรียงความ
แบบฝึกทักษะการเขียนเรียงความแบบฝึกทักษะการเขียนเรียงความ
แบบฝึกทักษะการเขียนเรียงความ
sripayom
 
โครงงานประเภท “การพัฒนาโปรแกรมประยุกต์”
โครงงานประเภท “การพัฒนาโปรแกรมประยุกต์”โครงงานประเภท “การพัฒนาโปรแกรมประยุกต์”
โครงงานประเภท “การพัฒนาโปรแกรมประยุกต์”
Royphim Namsongwong
 
ตัวอย่างโครงงานคอม
ตัวอย่างโครงงานคอมตัวอย่างโครงงานคอม
ตัวอย่างโครงงานคอม
Scott Tape
 
หนังสือเรียนภาษาไทยสำหรับชาวต่างชาติ
หนังสือเรียนภาษาไทยสำหรับชาวต่างชาติหนังสือเรียนภาษาไทยสำหรับชาวต่างชาติ
หนังสือเรียนภาษาไทยสำหรับชาวต่างชาติ
Jarinya Chaiyabin
 
การจัดการเรียนการสอนในยุคดิจิทัล
การจัดการเรียนการสอนในยุคดิจิทัลการจัดการเรียนการสอนในยุคดิจิทัล
การจัดการเรียนการสอนในยุคดิจิทัล
Surapon Boonlue
 
Adobe Flash CS6
 Adobe Flash CS6 Adobe Flash CS6
Adobe Flash CS6
siwaporn_jo
 
เล่มที่ 1present simpletense(new)
เล่มที่ 1present simpletense(new)เล่มที่ 1present simpletense(new)
เล่มที่ 1present simpletense(new)
thestorygu
 

Similar to Python Tutorial | Python Programming Language (20)

Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
Sujith Kumar
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
ANIKULSAIKH
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
TIB Academy
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
LakshmiNarayanaReddy48
 
python programminig and introduction.pptx
python programminig and introduction.pptxpython programminig and introduction.pptx
python programminig and introduction.pptx
urvashipundir04
 
introduction to python in computer graphics.pptx
introduction to python in computer graphics.pptxintroduction to python in computer graphics.pptx
introduction to python in computer graphics.pptx
urvashipundir04
 
Presentation on python
Presentation on pythonPresentation on python
Presentation on python
Venkat Projects
 
Python is a high-level, interpreted programming language known for its simpli...
Python is a high-level, interpreted programming language known for its simpli...Python is a high-level, interpreted programming language known for its simpli...
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...
Python is a high-level, interpreted programming language known for its simpli...Python is a high-level, interpreted programming language known for its simpli...
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
Python is a high-level, interpreted programming language that emphasizes read...
Python is a high-level, interpreted programming language that emphasizes read...Python is a high-level, interpreted programming language that emphasizes read...
Python is a high-level, interpreted programming language that emphasizes read...
bikomaster9459
 
Introduction to the Python
Introduction to the PythonIntroduction to the Python
Introduction to the Python
BMS Institute of Technology and Management
 
session5-Getting stated with Python.pdf
session5-Getting stated with Python.pdfsession5-Getting stated with Python.pdf
session5-Getting stated with Python.pdf
AyushDutta32
 
Cmpe202 01 Research
Cmpe202 01 ResearchCmpe202 01 Research
Cmpe202 01 Research
vladimirkorshak
 
university notes Lecture - 1 (Python) E-Notes.pptx
university notes Lecture - 1 (Python) E-Notes.pptxuniversity notes Lecture - 1 (Python) E-Notes.pptx
university notes Lecture - 1 (Python) E-Notes.pptx
7ja1nyx
 
Python basic
Python basicPython basic
Python basic
radhikaadroja
 
python unit2.pptx
python unit2.pptxpython unit2.pptx
python unit2.pptx
GEETHAS668001
 
Introduction-to-Python-Programming1.pptx
Introduction-to-Python-Programming1.pptxIntroduction-to-Python-Programming1.pptx
Introduction-to-Python-Programming1.pptx
vijayalakshmi257551
 
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
VisionAcademyProfSac
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
priyanshupanchal8
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
Sujith Kumar
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
ANIKULSAIKH
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
TIB Academy
 
Phython Programming Language
Phython Programming LanguagePhython Programming Language
Phython Programming Language
R.h. Himel
 
python programminig and introduction.pptx
python programminig and introduction.pptxpython programminig and introduction.pptx
python programminig and introduction.pptx
urvashipundir04
 
introduction to python in computer graphics.pptx
introduction to python in computer graphics.pptxintroduction to python in computer graphics.pptx
introduction to python in computer graphics.pptx
urvashipundir04
 
Python is a high-level, interpreted programming language known for its simpli...
Python is a high-level, interpreted programming language known for its simpli...Python is a high-level, interpreted programming language known for its simpli...
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...
Python is a high-level, interpreted programming language known for its simpli...Python is a high-level, interpreted programming language known for its simpli...
Python is a high-level, interpreted programming language known for its simpli...
bikomaster9459
 
Python is a high-level, interpreted programming language that emphasizes read...
Python is a high-level, interpreted programming language that emphasizes read...Python is a high-level, interpreted programming language that emphasizes read...
Python is a high-level, interpreted programming language that emphasizes read...
bikomaster9459
 
session5-Getting stated with Python.pdf
session5-Getting stated with Python.pdfsession5-Getting stated with Python.pdf
session5-Getting stated with Python.pdf
AyushDutta32
 
university notes Lecture - 1 (Python) E-Notes.pptx
university notes Lecture - 1 (Python) E-Notes.pptxuniversity notes Lecture - 1 (Python) E-Notes.pptx
university notes Lecture - 1 (Python) E-Notes.pptx
7ja1nyx
 
Introduction-to-Python-Programming1.pptx
Introduction-to-Python-Programming1.pptxIntroduction-to-Python-Programming1.pptx
Introduction-to-Python-Programming1.pptx
vijayalakshmi257551
 
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
VisionAcademyProfSac
 
Ad

More from anaveenkumar4 (14)

simulation based project presentation matlab Problem background Traditional s...
simulation based project presentation matlab Problem background Traditional s...simulation based project presentation matlab Problem background Traditional s...
simulation based project presentation matlab Problem background Traditional s...
anaveenkumar4
 
04_python_functions.ppt You can define functions to provide the required func...
04_python_functions.ppt You can define functions to provide the required func...04_python_functions.ppt You can define functions to provide the required func...
04_python_functions.ppt You can define functions to provide the required func...
anaveenkumar4
 
Electric circuits are classified in several ways. A direct-current circuit ca...
Electric circuits are classified in several ways. A direct-current circuit ca...Electric circuits are classified in several ways. A direct-current circuit ca...
Electric circuits are classified in several ways. A direct-current circuit ca...
anaveenkumar4
 
MATLAB UNIT-III.pptx
MATLAB UNIT-III.pptxMATLAB UNIT-III.pptx
MATLAB UNIT-III.pptx
anaveenkumar4
 
project.pptx
project.pptxproject.pptx
project.pptx
anaveenkumar4
 
pump.ppt
pump.pptpump.ppt
pump.ppt
anaveenkumar4
 
RET UNIT-4.pptx
RET UNIT-4.pptxRET UNIT-4.pptx
RET UNIT-4.pptx
anaveenkumar4
 
13012-41797-1-RV.pdf
13012-41797-1-RV.pdf13012-41797-1-RV.pdf
13012-41797-1-RV.pdf
anaveenkumar4
 
SolarThermal.pdf
SolarThermal.pdfSolarThermal.pdf
SolarThermal.pdf
anaveenkumar4
 
1-s2.0-S1878029613000716-main.pdf
1-s2.0-S1878029613000716-main.pdf1-s2.0-S1878029613000716-main.pdf
1-s2.0-S1878029613000716-main.pdf
anaveenkumar4
 
2_Off_Grid_Grid_Tied.pptx
2_Off_Grid_Grid_Tied.pptx2_Off_Grid_Grid_Tied.pptx
2_Off_Grid_Grid_Tied.pptx
anaveenkumar4
 
TRAINING PROGRAMME ON MATLAB ASSOCIATE EXAM (1).pptx
TRAINING PROGRAMME ON MATLAB  ASSOCIATE EXAM (1).pptxTRAINING PROGRAMME ON MATLAB  ASSOCIATE EXAM (1).pptx
TRAINING PROGRAMME ON MATLAB ASSOCIATE EXAM (1).pptx
anaveenkumar4
 
Batch 6.pptx
Batch 6.pptxBatch 6.pptx
Batch 6.pptx
anaveenkumar4
 
9-_Object_Oriented_Programming_Using_Python.pdf
9-_Object_Oriented_Programming_Using_Python.pdf9-_Object_Oriented_Programming_Using_Python.pdf
9-_Object_Oriented_Programming_Using_Python.pdf
anaveenkumar4
 
simulation based project presentation matlab Problem background Traditional s...
simulation based project presentation matlab Problem background Traditional s...simulation based project presentation matlab Problem background Traditional s...
simulation based project presentation matlab Problem background Traditional s...
anaveenkumar4
 
04_python_functions.ppt You can define functions to provide the required func...
04_python_functions.ppt You can define functions to provide the required func...04_python_functions.ppt You can define functions to provide the required func...
04_python_functions.ppt You can define functions to provide the required func...
anaveenkumar4
 
Electric circuits are classified in several ways. A direct-current circuit ca...
Electric circuits are classified in several ways. A direct-current circuit ca...Electric circuits are classified in several ways. A direct-current circuit ca...
Electric circuits are classified in several ways. A direct-current circuit ca...
anaveenkumar4
 
MATLAB UNIT-III.pptx
MATLAB UNIT-III.pptxMATLAB UNIT-III.pptx
MATLAB UNIT-III.pptx
anaveenkumar4
 
13012-41797-1-RV.pdf
13012-41797-1-RV.pdf13012-41797-1-RV.pdf
13012-41797-1-RV.pdf
anaveenkumar4
 
1-s2.0-S1878029613000716-main.pdf
1-s2.0-S1878029613000716-main.pdf1-s2.0-S1878029613000716-main.pdf
1-s2.0-S1878029613000716-main.pdf
anaveenkumar4
 
2_Off_Grid_Grid_Tied.pptx
2_Off_Grid_Grid_Tied.pptx2_Off_Grid_Grid_Tied.pptx
2_Off_Grid_Grid_Tied.pptx
anaveenkumar4
 
TRAINING PROGRAMME ON MATLAB ASSOCIATE EXAM (1).pptx
TRAINING PROGRAMME ON MATLAB  ASSOCIATE EXAM (1).pptxTRAINING PROGRAMME ON MATLAB  ASSOCIATE EXAM (1).pptx
TRAINING PROGRAMME ON MATLAB ASSOCIATE EXAM (1).pptx
anaveenkumar4
 
9-_Object_Oriented_Programming_Using_Python.pdf
9-_Object_Oriented_Programming_Using_Python.pdf9-_Object_Oriented_Programming_Using_Python.pdf
9-_Object_Oriented_Programming_Using_Python.pdf
anaveenkumar4
 
Ad

Recently uploaded (20)

Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 
Value Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous SecurityValue Stream Mapping Worskshops for Intelligent Continuous Security
Value Stream Mapping Worskshops for Intelligent Continuous Security
Marc Hornbeek
 
QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)QA/QC Manager (Quality management Expert)
QA/QC Manager (Quality management Expert)
rccbatchplant
 
15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...15th International Conference on Computer Science, Engineering and Applicatio...
15th International Conference on Computer Science, Engineering and Applicatio...
IJCSES Journal
 
Introduction to FLUID MECHANICS & KINEMATICS
Introduction to FLUID MECHANICS &  KINEMATICSIntroduction to FLUID MECHANICS &  KINEMATICS
Introduction to FLUID MECHANICS & KINEMATICS
narayanaswamygdas
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
ELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdfELectronics Boards & Product Testing_Shiju.pdf
ELectronics Boards & Product Testing_Shiju.pdf
Shiju Jacob
 
Artificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptxArtificial Intelligence (AI) basics.pptx
Artificial Intelligence (AI) basics.pptx
aditichinar
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
DATA-DRIVEN SHOULDER INVERSE KINEMATICS YoungBeom Kim1 , Byung-Ha Park1 , Kwa...
charlesdick1345
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptxExplainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
Explainable-Artificial-Intelligence-XAI-A-Deep-Dive (1).pptx
MahaveerVPandit
 
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdfRICS Membership-(The Royal Institution of Chartered Surveyors).pdf
RICS Membership-(The Royal Institution of Chartered Surveyors).pdf
MohamedAbdelkader115
 
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design ThinkingDT REPORT by Tech titan GROUP to introduce the subject design Thinking
DT REPORT by Tech titan GROUP to introduce the subject design Thinking
DhruvChotaliya2
 
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdfMAQUINARIA MINAS CEMA 6th Edition (1).pdf
MAQUINARIA MINAS CEMA 6th Edition (1).pdf
ssuser562df4
 
DSP and MV the Color image processing.ppt
DSP and MV the  Color image processing.pptDSP and MV the  Color image processing.ppt
DSP and MV the Color image processing.ppt
HafizAhamed8
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Data Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptxData Structures_Searching and Sorting.pptx
Data Structures_Searching and Sorting.pptx
RushaliDeshmukh2
 

Python Tutorial | Python Programming Language

  • 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 V an 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 Moreover, doing these things in the Bourne administration utilities in C was taking too long. shell wouldn'twork foravarietyof reasons. ... So, there was a need for a language that would bridge thegap between C and the shell” - GuidoVan Rossum
  • 8. Scope of Python Science - Bioinformatics SystemAdministration -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, irrespective of platform.
  • 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. 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 Y ouTube video sharing service is largely written in Python
  • 15. What can I do with Python…? System programming Graphical User Interface Programming Internet Scripting Component Integration Database Programming Gaming, Images, XML , Robot and more
  • 16. A Sample Code # A comment. #Another one. x = 34 - 23 y = “Hello” z = 3.45 if z == 3.45 or y == “Hello”: x = x + 1 # String concat. y = y + “ World” print x print y
  • 17. 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
  • 18. 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)
  • 19. 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