SlideShare une entreprise Scribd logo
1  sur  19
Disclaimer:This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd
PYTHON
  Ashwin Anand V
  Email/facebook id:ashwinanand99@gmail.com
   Created in 1991 by Guido Van Rossum
What is Python?
• A programming language with strong
  similarities to PERL, but with powerful
  typing and object oriented features.
  – Commonly used for producing HTML content
    on websites. Great for text files.
  – Useful built-in types (lists, dictionaries).
  – Clean syntax, powerful extensions.
Use an integrated development environment (IDE)



                                        Source
                                          file




                                         Execution
                                           shell
Why Python?
• Natural Language Tool Kit
• Ease of use; interpreter
• AI Processing: Symbolic
   – Python’s built-in data types for strings, lists, and more.
   – Java or C++ require the use of special classes for this.
• AI Processing: Statistical
   – Python has strong numeric processing capabilities:
     matrix operations, etc.
   – Suitable for probability and machine learning code.
Compiling and interpreting
• Many languages require you to compile (translate) your
  program into a form that the machine understands.
                          compile             execute
            source code         byte code          output
            Hello.java          Hello.class



• Python is instead directly interpreted into machine
  instructions.
                                      interpret
                     source code              output
                     Hello.py
Python features
no compiling or linking          rapid development cycle
no type declarations             simpler, shorter, more flexible
automatic memory management      garbage collection
high-level data types and        fast development
operations
object-oriented programming      code structuring and reuse, C++
embedding and extending in C     mixed language systems
classes, modules, exceptions     "programming-in-the-large"
                                 support
dynamic loading of C modules     simplified extensions, smaller
                                 binaries
dynamic reloading of C modules   programs can be modified without
                                 stopping
Python features
universal "first-class" object model   fewer restrictions and rules

run-time program construction          handles unforeseen needs, end-
                                       user coding
interactive, dynamic nature            incremental development and
                                       testing
access to interpreter information      metaprogramming, introspective
                                       objects
wide portability                       cross-platform programming
                                       without ports
compilation to portable byte-code      execution speed, protecting source
                                       code
built-in interfaces to external        system tools, GUIs, persistence,
services                               databases, etc.
Variables
  Variables are names for values
  Created by use: no declaration necessary

>>> planet = 'Pluto'          variable       value
>>> print planet
Pluto                         planet         'Pluto'
>>> moon = 'Charon'
>>> p = planet                moon           'Charon'
>>> print p
Pluto                         p
>>>
A variable is just a name
  Does not have a type

>>> planet = 'Pluto'          variable    value
>>> planet = 9
                              planet      'Pluto'
>>>
                                          9


  Values are garbage collected
  If nothing refers to data any longer, it can be recycled
 Expression
 Print : Produces text output on the console
Syntax:
       print "Message"
       print Expression
    Prints the given text message or expression value on the console, and
       moves the cursor down to the next line.

       print Item1, Item2, ..., ItemN
    Prints several messages and/or expressions on the same line.

Examples:
      print "Hello, world!"
      age = 45
      print "You have", 65 - age, "years until retirement"
    Output:
       Hello, world!
       You have 20 years until retirement
 Input
• input : Reads a number from user input.
   – You can assign (store) the result of input into a variable.
   – Example:
     age = input("How old are you? ")
     print "Your age is", age
     print "You have", 65 - age, "years until retirement“

     Output:
     How old are you? 53
     Your age is 53
     You have 12 years until retirement
Uses of Python
• shell tools
    – system admin tools, command line programs
• extension-language work
• rapid prototyping and development
• language-based modules
    – instead of special-purpose parsers
•   graphical user interfaces
•   database access
•   distributed programming
•   Internet scripting
What not to use Python (and kin)
              for
• most scripting languages share these
• not as efficient as C
  – but sometimes better built-in algorithms (e.g.,
    hashing and sorting)
• delayed error notification
• lack of profiling tools
Thank you
• If this presentation helped you, please visit
  our page facebook.com/baabtra and like it.
  Thanks in advance.

• www.baabtra.com | www.massbaab.com |ww
  w.baabte.com
Contact Us

Contenu connexe

Tendances

Programming language design and implemenation
Programming language design and implemenationProgramming language design and implemenation
Programming language design and implemenationAshwini Awatare
 
Programming introduction
Programming introductionProgramming introduction
Programming introductionBharat Gupta
 
Programming Languages: Trends for 2021
Programming Languages: Trends for 2021Programming Languages: Trends for 2021
Programming Languages: Trends for 2021Svetlin Nakov
 
Computer programming programming_langugages
Computer programming programming_langugagesComputer programming programming_langugages
Computer programming programming_langugageseShikshak
 
Programing paradigm & implementation
Programing paradigm & implementationPrograming paradigm & implementation
Programing paradigm & implementationBilal Maqbool ツ
 
summer training report on python
summer training report on pythonsummer training report on python
summer training report on pythonShubham Yadav
 
Difference between python and c++
Difference between python and c++Difference between python and c++
Difference between python and c++Ibrahimsumidi
 
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonBenefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonparadisetechsoftsolutions
 
Python programming
Python programmingPython programming
Python programmingMegha V
 
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worldsmbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling WorldsIstvan Rath
 
Python for the Mobile and Web
Python for the Mobile and WebPython for the Mobile and Web
Python for the Mobile and WebDerek Kiong
 
Python presentation by Monu Sharma
Python presentation by Monu SharmaPython presentation by Monu Sharma
Python presentation by Monu SharmaMayank Sharma
 
So you want to be a programmer
So you want to be a programmerSo you want to be a programmer
So you want to be a programmerBusayo Oyebisi
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonAgung Wahyudi
 
Programming Language
Programming  LanguageProgramming  Language
Programming LanguageAdeel Hamid
 

Tendances (20)

Programming language design and implemenation
Programming language design and implemenationProgramming language design and implemenation
Programming language design and implemenation
 
Programming introduction
Programming introductionProgramming introduction
Programming introduction
 
Programming Languages: Trends for 2021
Programming Languages: Trends for 2021Programming Languages: Trends for 2021
Programming Languages: Trends for 2021
 
Computer programming programming_langugages
Computer programming programming_langugagesComputer programming programming_langugages
Computer programming programming_langugages
 
Programing paradigm & implementation
Programing paradigm & implementationPrograming paradigm & implementation
Programing paradigm & implementation
 
summer training report on python
summer training report on pythonsummer training report on python
summer training report on python
 
Evolution of Computer Languages
Evolution of Computer LanguagesEvolution of Computer Languages
Evolution of Computer Languages
 
Difference between python and c++
Difference between python and c++Difference between python and c++
Difference between python and c++
 
Python and data analytics
Python and data analyticsPython and data analytics
Python and data analytics
 
Benefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of pythonBenefits & features of python |Advantages & disadvantages of python
Benefits & features of python |Advantages & disadvantages of python
 
Python programming
Python programmingPython programming
Python programming
 
Programming landuages
Programming landuagesProgramming landuages
Programming landuages
 
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worldsmbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
mbeddr meets IncQuer - Combining the Best Features of Two Modeling Worlds
 
Go programing language
Go programing languageGo programing language
Go programing language
 
Lec 1 25_jul13
Lec 1 25_jul13Lec 1 25_jul13
Lec 1 25_jul13
 
Python for the Mobile and Web
Python for the Mobile and WebPython for the Mobile and Web
Python for the Mobile and Web
 
Python presentation by Monu Sharma
Python presentation by Monu SharmaPython presentation by Monu Sharma
Python presentation by Monu Sharma
 
So you want to be a programmer
So you want to be a programmerSo you want to be a programmer
So you want to be a programmer
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Programming Language
Programming  LanguageProgramming  Language
Programming Language
 

En vedette

En vedette (19)

Basics of C porgramming
Basics of C porgrammingBasics of C porgramming
Basics of C porgramming
 
Mail in php codeigniter
Mail in php codeigniterMail in php codeigniter
Mail in php codeigniter
 
Binary tree
Binary treeBinary tree
Binary tree
 
XML
XMLXML
XML
 
XML
XMLXML
XML
 
Java exeception handling
Java exeception handlingJava exeception handling
Java exeception handling
 
XML
XMLXML
XML
 
Stack and heap
Stack and heapStack and heap
Stack and heap
 
Travel agency
Travel agency Travel agency
Travel agency
 
Html tags
Html tagsHtml tags
Html tags
 
MIS
MISMIS
MIS
 
Flowchart& algorithom
Flowchart& algorithomFlowchart& algorithom
Flowchart& algorithom
 
Dependent selection box using codeigniter ajax
Dependent selection box using codeigniter ajaxDependent selection box using codeigniter ajax
Dependent selection box using codeigniter ajax
 
Claas diagram
Claas diagramClaas diagram
Claas diagram
 
Modules in Python
Modules in PythonModules in Python
Modules in Python
 
how to prepare for an interview
how to prepare for an interviewhow to prepare for an interview
how to prepare for an interview
 
Bill gates and his contributions to world
Bill gates and his contributions to worldBill gates and his contributions to world
Bill gates and his contributions to world
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
System software and Application software
System software and Application softwareSystem software and Application software
System software and Application software
 

Similaire à Python Basics and Uses

Presentation on python
Presentation on pythonPresentation on python
Presentation on pythonwilliam john
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonMohammed Rafi
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxlemonchoos
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unitmichaelaaron25322
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdfANIKULSAIKH
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python ProgrammingAkhil Kaushik
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET DeveloperSarah Dutkiewicz
 
Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Rr
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyTIB Academy
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Ali alshehri c++_comparison between c++&python
Ali alshehri c++_comparison between c++&pythonAli alshehri c++_comparison between c++&python
Ali alshehri c++_comparison between c++&pythonAliAAAlshehri
 
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
 
Programming in python in detail concept .pptx
Programming in python in detail concept .pptxProgramming in python in detail concept .pptx
Programming in python in detail concept .pptxKavitha713564
 

Similaire à Python Basics and Uses (20)

Presentation on python
Presentation on pythonPresentation on python
Presentation on python
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
intro.pptx (1).pdf
intro.pptx (1).pdfintro.pptx (1).pdf
intro.pptx (1).pdf
 
Introduction to Python Programming
Introduction to Python ProgrammingIntroduction to Python Programming
Introduction to Python Programming
 
Python 101 for the .NET Developer
Python 101 for the .NET DeveloperPython 101 for the .NET Developer
Python 101 for the .NET Developer
 
Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)Fantasy cricket game using python(intershala project)
Fantasy cricket game using python(intershala project)
 
Python tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academyPython tutorial for beginners - Tib academy
Python tutorial for beginners - Tib academy
 
IPT 2.pptx
IPT 2.pptxIPT 2.pptx
IPT 2.pptx
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Introduction python
Introduction pythonIntroduction python
Introduction python
 
Ali alshehri c++_comparison between c++&python
Ali alshehri c++_comparison between c++&pythonAli alshehri c++_comparison between c++&python
Ali alshehri c++_comparison between c++&python
 
Introduction to python for Beginners
Introduction to python for Beginners Introduction to python for Beginners
Introduction to python for Beginners
 
Research paper on python by Rj
Research paper on python by RjResearch paper on python by Rj
Research paper on python by Rj
 
Python Tutorial | Python Programming Language
Python Tutorial | Python Programming LanguagePython Tutorial | Python Programming Language
Python Tutorial | Python Programming Language
 
Python Online From EasyLearning Guru
Python Online From EasyLearning GuruPython Online From EasyLearning Guru
Python Online From EasyLearning Guru
 
Programming in python in detail concept .pptx
Programming in python in detail concept .pptxProgramming in python in detail concept .pptx
Programming in python in detail concept .pptx
 
P1 2017 python
P1 2017 pythonP1 2017 python
P1 2017 python
 

Plus de baabtra.com - No. 1 supplier of quality freshers

Plus de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Python Basics and Uses

  • 1.
  • 2. Disclaimer:This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd
  • 3. PYTHON Ashwin Anand V Email/facebook id:ashwinanand99@gmail.com
  • 4. Created in 1991 by Guido Van Rossum
  • 5. What is Python? • A programming language with strong similarities to PERL, but with powerful typing and object oriented features. – Commonly used for producing HTML content on websites. Great for text files. – Useful built-in types (lists, dictionaries). – Clean syntax, powerful extensions.
  • 6. Use an integrated development environment (IDE) Source file Execution shell
  • 7. Why Python? • Natural Language Tool Kit • Ease of use; interpreter • AI Processing: Symbolic – Python’s built-in data types for strings, lists, and more. – Java or C++ require the use of special classes for this. • AI Processing: Statistical – Python has strong numeric processing capabilities: matrix operations, etc. – Suitable for probability and machine learning code.
  • 8. Compiling and interpreting • Many languages require you to compile (translate) your program into a form that the machine understands. compile execute source code byte code output Hello.java Hello.class • Python is instead directly interpreted into machine instructions. interpret source code output Hello.py
  • 9. Python features no compiling or linking rapid development cycle no type declarations simpler, shorter, more flexible automatic memory management garbage collection high-level data types and fast development operations object-oriented programming code structuring and reuse, C++ embedding and extending in C mixed language systems classes, modules, exceptions "programming-in-the-large" support dynamic loading of C modules simplified extensions, smaller binaries dynamic reloading of C modules programs can be modified without stopping
  • 10. Python features universal "first-class" object model fewer restrictions and rules run-time program construction handles unforeseen needs, end- user coding interactive, dynamic nature incremental development and testing access to interpreter information metaprogramming, introspective objects wide portability cross-platform programming without ports compilation to portable byte-code execution speed, protecting source code built-in interfaces to external system tools, GUIs, persistence, services databases, etc.
  • 11. Variables Variables are names for values Created by use: no declaration necessary >>> planet = 'Pluto' variable value >>> print planet Pluto planet 'Pluto' >>> moon = 'Charon' >>> p = planet moon 'Charon' >>> print p Pluto p >>>
  • 12. A variable is just a name Does not have a type >>> planet = 'Pluto' variable value >>> planet = 9 planet 'Pluto' >>> 9 Values are garbage collected If nothing refers to data any longer, it can be recycled
  • 13.  Expression  Print : Produces text output on the console Syntax: print "Message" print Expression Prints the given text message or expression value on the console, and moves the cursor down to the next line. print Item1, Item2, ..., ItemN Prints several messages and/or expressions on the same line. Examples: print "Hello, world!" age = 45 print "You have", 65 - age, "years until retirement" Output: Hello, world! You have 20 years until retirement
  • 14.  Input • input : Reads a number from user input. – You can assign (store) the result of input into a variable. – Example: age = input("How old are you? ") print "Your age is", age print "You have", 65 - age, "years until retirement“ Output: How old are you? 53 Your age is 53 You have 12 years until retirement
  • 15. Uses of Python • shell tools – system admin tools, command line programs • extension-language work • rapid prototyping and development • language-based modules – instead of special-purpose parsers • graphical user interfaces • database access • distributed programming • Internet scripting
  • 16. What not to use Python (and kin) for • most scripting languages share these • not as efficient as C – but sometimes better built-in algorithms (e.g., hashing and sorting) • delayed error notification • lack of profiling tools
  • 18. • If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. • www.baabtra.com | www.massbaab.com |ww w.baabte.com