SlideShare uma empresa Scribd logo
1 de 20
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

Mais conteúdo relacionado

Mais procurados

Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019Samir Mohanty
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming KrishnaMildain
 
Interactive Python PPT with animations
Interactive Python PPT with animationsInteractive Python PPT with animations
Interactive Python PPT with animationsShauryaChawla4
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)guobichrng
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-pythonAakashdata
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installingMohd Sajjad
 
How to think like a computer scientist - Learn with python
How to think like a computer scientist - Learn with pythonHow to think like a computer scientist - Learn with python
How to think like a computer scientist - Learn with pythonRajendra Kumar Uppal
 
Python Libraries and Modules
Python Libraries and ModulesPython Libraries and Modules
Python Libraries and ModulesRaginiJain21
 
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
Python Course | Python Programming | Python Tutorial | Python Training | EdurekaPython Course | Python Programming | Python Tutorial | Python Training | Edureka
Python Course | Python Programming | Python Tutorial | Python Training | EdurekaEdureka!
 

Mais procurados (20)

Python ppt
Python pptPython ppt
Python ppt
 
Overview of python 2019
Overview of python 2019Overview of python 2019
Overview of python 2019
 
Introduction to python
 Introduction to python Introduction to python
Introduction to python
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Python
PythonPython
Python
 
Interactive Python PPT with animations
Interactive Python PPT with animationsInteractive Python PPT with animations
Interactive Python PPT with animations
 
Python Intro
Python IntroPython Intro
Python Intro
 
introduction to Python (for beginners)
introduction to Python (for beginners)introduction to Python (for beginners)
introduction to Python (for beginners)
 
Python
PythonPython
Python
 
Introduction to-python
Introduction to-pythonIntroduction to-python
Introduction to-python
 
Python
PythonPython
Python
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Python ppt
Python pptPython ppt
Python ppt
 
Programming with Python
Programming with PythonProgramming with Python
Programming with Python
 
Python-00 | Introduction and installing
Python-00 | Introduction and installingPython-00 | Introduction and installing
Python-00 | Introduction and installing
 
How to think like a computer scientist - Learn with python
How to think like a computer scientist - Learn with pythonHow to think like a computer scientist - Learn with python
How to think like a computer scientist - Learn with python
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
 
Python Libraries and Modules
Python Libraries and ModulesPython Libraries and Modules
Python Libraries and Modules
 
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
Python Course | Python Programming | Python Tutorial | Python Training | EdurekaPython Course | Python Programming | Python Tutorial | Python Training | Edureka
Python Course | Python Programming | Python Tutorial | Python Training | Edureka
 
Python
PythonPython
Python
 

Semelhante a Python tutorial for beginners - Tib academy

Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners Sujith Kumar
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Languageanaveenkumar4
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxlemonchoos
 
Module1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptxModule1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptxSandeepR95
 
session5-Getting stated with Python.pdf
session5-Getting stated with Python.pdfsession5-Getting stated with Python.pdf
session5-Getting stated with Python.pdfAyushDutta32
 
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
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONRuchiNagar3
 
Simple calulator using GUI tkinter.pptx
Simple calulator using GUI tkinter.pptxSimple calulator using GUI tkinter.pptx
Simple calulator using GUI tkinter.pptxYashSharma357857
 
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
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxAditya Patel
 
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfYadavHarshKr
 

Semelhante a Python tutorial for beginners - Tib academy (20)

Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
 
Python Programming Draft PPT.pptx
Python Programming Draft PPT.pptxPython Programming Draft PPT.pptx
Python Programming Draft PPT.pptx
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Module1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptxModule1-Chapter1_ppt.pptx
Module1-Chapter1_ppt.pptx
 
Python basic
Python basicPython basic
Python basic
 
session5-Getting stated with Python.pdf
session5-Getting stated with Python.pdfsession5-Getting stated with Python.pdf
session5-Getting stated with Python.pdf
 
Introduction to the Python
Introduction to the PythonIntroduction to the Python
Introduction to the Python
 
python unit2.pptx
python unit2.pptxpython unit2.pptx
python unit2.pptx
 
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
 
Lecture 1.pptx
Lecture 1.pptxLecture 1.pptx
Lecture 1.pptx
 
ppt summer training ug.pptx
ppt summer training ug.pptxppt summer training ug.pptx
ppt summer training ug.pptx
 
INTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHONINTRODUCTION-TO-PYTHON
INTRODUCTION-TO-PYTHON
 
Simple calulator using GUI tkinter.pptx
Simple calulator using GUI tkinter.pptxSimple calulator using GUI tkinter.pptx
Simple calulator using GUI tkinter.pptx
 
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.
 
Basic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptxBasic Python Introduction Lecture 1.pptx
Basic Python Introduction Lecture 1.pptx
 
Introduction to Python
Introduction to PythonIntroduction to Python
Introduction to Python
 
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
 

Mais de TIB Academy

Ios operating system
Ios operating systemIos operating system
Ios operating systemTIB Academy
 
CCNA Introducing
CCNA IntroducingCCNA Introducing
CCNA IntroducingTIB Academy
 
Hadoop training in bangalore
Hadoop training in bangaloreHadoop training in bangalore
Hadoop training in bangaloreTIB Academy
 
CCNA Introducing
CCNA IntroducingCCNA Introducing
CCNA IntroducingTIB Academy
 
Hadoop tutorial for Freshers,
Hadoop tutorial for Freshers, Hadoop tutorial for Freshers,
Hadoop tutorial for Freshers, TIB Academy
 
Selenium institute in bangalore
Selenium institute in bangaloreSelenium institute in bangalore
Selenium institute in bangaloreTIB Academy
 
Selenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademySelenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademyTIB Academy
 
Django framework
Django framework Django framework
Django framework TIB Academy
 
Core java tutorials
Core java  tutorialsCore java  tutorials
Core java tutorialsTIB Academy
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorialsTIB Academy
 
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangaloreOracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangaloreTIB Academy
 
Best Angularjs tutorial for beginners - TIB Academy
Best Angularjs tutorial for beginners - TIB AcademyBest Angularjs tutorial for beginners - TIB Academy
Best Angularjs tutorial for beginners - TIB AcademyTIB Academy
 

Mais de TIB Academy (17)

Msbi
MsbiMsbi
Msbi
 
Ios operating system
Ios operating systemIos operating system
Ios operating system
 
Salesforce
Salesforce  Salesforce
Salesforce
 
CCNA Introducing
CCNA IntroducingCCNA Introducing
CCNA Introducing
 
Hadoop training in bangalore
Hadoop training in bangaloreHadoop training in bangalore
Hadoop training in bangalore
 
CCNA Introducing
CCNA IntroducingCCNA Introducing
CCNA Introducing
 
Hadoop tutorial for Freshers,
Hadoop tutorial for Freshers, Hadoop tutorial for Freshers,
Hadoop tutorial for Freshers,
 
Hadoop training
Hadoop trainingHadoop training
Hadoop training
 
Selenium institute in bangalore
Selenium institute in bangaloreSelenium institute in bangalore
Selenium institute in bangalore
 
Selenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB AcademySelenium Tutorial for Beginners - TIB Academy
Selenium Tutorial for Beginners - TIB Academy
 
Django framework
Django framework Django framework
Django framework
 
Python basics
Python basicsPython basics
Python basics
 
Core java tutorials
Core java  tutorialsCore java  tutorials
Core java tutorials
 
Spring tutorials
Spring tutorialsSpring tutorials
Spring tutorials
 
78
7878
78
 
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangaloreOracle DBA Tutorial for Beginners -Oracle training institute in bangalore
Oracle DBA Tutorial for Beginners -Oracle training institute in bangalore
 
Best Angularjs tutorial for beginners - TIB Academy
Best Angularjs tutorial for beginners - TIB AcademyBest Angularjs tutorial for beginners - TIB Academy
Best Angularjs tutorial for beginners - TIB Academy
 

Último

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 

Último (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 

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