SlideShare a Scribd company logo
PythonandperLMara Angelica M. RefraccionBSCS41A
Python
python and perl
An interpreted, general-purpose high level programming language whose design philosophy emphasizes code readability.
Very clear, readable syntax
Intuitive object orientation
Natural expression of procedural code
Full modularity, supporting hierarchical packagesException-based error handling
Very high level dynamic data types
Extensive standard libraries and third party modules for virtually every task.
Extensions and modules easily written in C, C++ (or Java for Jython, or .NET languages for IronPython)
Embeddable within applications as a scripting interfaceHistoryPython was conceived in the late 1980s and its implementation was started in December 1989
Guido van Rossum (Python's principal author, and his continuing central role in deciding the direction of Python is reflected in the title given to him by the Python community, Benevolent Dictator for life(BDFL))
CWI in the Netherlands  Python 2.0 was released on 16 October 2000, with many major new features including a full garbage collector
 Python 3.0 (also known as Python 3000 or py3k was released on 3 December 2008 after a long period of testing.
Python has twice been awarded as TIOBE Programming Language of the Year (2007, 2010), which is given to the language with the greatest growth in popularity over the course of the year (as measured by the TIOBE index)
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
Basic Syntax#                               # comment  \                               # line continuation  ;                               # statement separator (like C) None                            # NULL  not                             # logical/boolean not returns True/False == != < > <= >=                 # equality, relational  is                              # object identity is not **                              # power (x^y)  //                              # floor division (truncates to integer)
float(123) float('123.0')       # convert integer/string to float int(1.5)                        # convert to integer (truncate) bool(x)                         # convert to booleanhex(15)                         # convert to string in hex format int('101',2)                    # convert to int from binary number in string
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
python and perl
Basis Reserved wordsExpression statements are used (mostly interactively) to compute and write a value, or (usually) to call a procedure (a function that returns no meaningful result; in Python, procedures return the value None).
Assert statements are a convenient way to insert debugging assertions into a program.
Pass is a null operation — when it is executed, nothing happens. It is useful as a placeholder when a statement is required syntactically, but no code needs to be executed.Deletion of a target list recursively deletes each target, from left to right.
Print evaluates each expression in turn and writes the resulting object to standard output .
Break may only occur syntactically nested in a for or whileloop, but not nested in a function or class definition within that loop.Continue may only occur syntactically nested in a for or while loop, but not nested in a function or class definition or finally clause within that loop. It continues with the next cycle of the nearest enclosing loop.
Import statements are executed in two steps: (1) find a module, and initialize it if necessary; (2) define a name or names in the local namespace (of the scope where the import statement occurs).
The global statement is a declaration which holds for the entire current code block. Python ApplicationWeb development	*Extensive support for HTML and XML.	*E-mail processing.	*Processing RSS feeds.	*Support for many other Internet protocols.Database Access	*MySQL, Oracle, MS SQL Server, PostgreSQL, SybODBC, and others are available for free download.Scientific and Numeric	*Bioinformatics	*Python course in Bioinformatics	*Physics
Education
Network Programming	*Easy-to-use socket interface	*Twisted Python, a framework for asynchronous network 	programming.Software Development
Game and 3D GraphicsPerl
Perl is a interpreted and dynamic programming language
Perl is stable and cross-platform programming language.
It has inherited the best features from C, Basic and other programming languages.
Perl supports Unicode character encoding for foreign letters.Other interesting feature is, it supports both procedural and object oriented programming.
Perl is extensible and can be integrated with C and C++.
Perl is best known for powerful text processing engine.
Perlwas known to be the most popular web programming language until PHP supercedes it.HistoryPerl was initially developed by Larry Wall in 1987.
Perl is a open source software licensed under GNU public license
It was made as a unix scripting language for reporting process.Perl is also called as the swiss army chainsaw of programming languages due to its flexible and adaptable nature.
Perl  2 released in 1988 with better and improved regular exprssion engine
In 1989, perl 3 was released with added feature of handling binary data streams.In 1991, perl reference documentations has been published, it is also called as ‘Camel Book’ and version was renamed to Perl 4.
Perl interpreter was completely rewritten and released in 1994 as Perl verison 5.
Perl 5.x version is the most widely used as of nowComparison with Other Programming LanguagesC/C++Perl is written in the C programming language.

More Related Content

PPTX
While loop
PPTX
Python Programming Homework Help
PPT
Introduction to Python
PDF
Python programming msc(cs)
PPTX
Introduction to python
DOCX
Python interview questions and answers
ODP
Python Presentation
PPSX
Programming with Python
While loop
Python Programming Homework Help
Introduction to Python
Python programming msc(cs)
Introduction to python
Python interview questions and answers
Python Presentation
Programming with Python

What's hot (20)

PPT
General Talk on Pointers
PDF
Let’s Learn Python An introduction to Python
PDF
Python Foundation – A programmer's introduction to Python concepts & style
PDF
Python Interview Questions And Answers
PPTX
Ground Gurus - Python Code Camp - Day 3 - Classes
PDF
Python revision tour i
PDF
Control structures functions and modules in python programming
PPTX
Intro to Python Programming Language
PDF
Perl_Part4
PPTX
Survelaine murillo ppt
DOCX
Python interview questions
PPTX
Introduction to python
PDF
Python interview questions
PPTX
Learn Python The Hard Way Presentation
PDF
C++0x :: Introduction to some amazing features
PPT
pointer, structure ,union and intro to file handling
PPT
pointer, structure ,union and intro to file handling
PPTX
Introduction To Programming with Python-1
PPT
Mca 1 pic u-5 pointer, structure ,union and intro to file handling
General Talk on Pointers
Let’s Learn Python An introduction to Python
Python Foundation – A programmer's introduction to Python concepts & style
Python Interview Questions And Answers
Ground Gurus - Python Code Camp - Day 3 - Classes
Python revision tour i
Control structures functions and modules in python programming
Intro to Python Programming Language
Perl_Part4
Survelaine murillo ppt
Python interview questions
Introduction to python
Python interview questions
Learn Python The Hard Way Presentation
C++0x :: Introduction to some amazing features
pointer, structure ,union and intro to file handling
pointer, structure ,union and intro to file handling
Introduction To Programming with Python-1
Mca 1 pic u-5 pointer, structure ,union and intro to file handling
Ad

Similar to python and perl (20)

PDF
Perl University: Getting Started with Perl
PPTX
Python_ppt for basics of python in details
PPT
Help with Pyhon Programming Homework
ODP
Introduction to Python
PPTX
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
PDF
Computer Related material named Phython ok
PDF
Lecture 22
PPT
Spsl iv unit final
PPT
Spsl iv unit final
PDF
newperl5
PDF
newperl5
PDF
Python for katana
PPTX
Python Demo.pptx
PPTX
Presentation new
PPTX
Welcome to python workshop
PPTX
Python Demo.pptx
PPT
Python Programming1.ppt
PPTX
2022-23TYBSC(CS)-Python Prog._Chapter-1.pptx
Perl University: Getting Started with Perl
Python_ppt for basics of python in details
Help with Pyhon Programming Homework
Introduction to Python
2015 bioinformatics python_introduction_wim_vancriekinge_vfinal
Computer Related material named Phython ok
Lecture 22
Spsl iv unit final
Spsl iv unit final
newperl5
newperl5
Python for katana
Python Demo.pptx
Presentation new
Welcome to python workshop
Python Demo.pptx
Python Programming1.ppt
2022-23TYBSC(CS)-Python Prog._Chapter-1.pptx
Ad

Recently uploaded (20)

PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
Cell Structure & Organelles in detailed.
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
Pharma ospi slides which help in ospi learning
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PPTX
Introduction and Scope of Bichemistry.pptx
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Open Quiz Monsoon Mind Game Prelims.pptx
PPTX
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
PDF
Pre independence Education in Inndia.pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Business Ethics Teaching Materials for college
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
Microbial disease of the cardiovascular and lymphatic systems
Cell Structure & Organelles in detailed.
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Abdominal Access Techniques with Prof. Dr. R K Mishra
Pharma ospi slides which help in ospi learning
O7-L3 Supply Chain Operations - ICLT Program
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Introduction and Scope of Bichemistry.pptx
TR - Agricultural Crops Production NC III.pdf
Open Quiz Monsoon Mind Game Prelims.pptx
COMPUTERS AS DATA ANALYSIS IN PRECLINICAL DEVELOPMENT.pptx
Pre independence Education in Inndia.pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Business Ethics Teaching Materials for college
FourierSeries-QuestionsWithAnswers(Part-A).pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
STATICS OF THE RIGID BODIES Hibbelers.pdf

python and perl

  • 1. PythonandperLMara Angelica M. RefraccionBSCS41A
  • 4. An interpreted, general-purpose high level programming language whose design philosophy emphasizes code readability.
  • 7. Natural expression of procedural code
  • 8. Full modularity, supporting hierarchical packagesException-based error handling
  • 9. Very high level dynamic data types
  • 10. Extensive standard libraries and third party modules for virtually every task.
  • 11. Extensions and modules easily written in C, C++ (or Java for Jython, or .NET languages for IronPython)
  • 12. Embeddable within applications as a scripting interfaceHistoryPython was conceived in the late 1980s and its implementation was started in December 1989
  • 13. Guido van Rossum (Python's principal author, and his continuing central role in deciding the direction of Python is reflected in the title given to him by the Python community, Benevolent Dictator for life(BDFL))
  • 14. CWI in the Netherlands  Python 2.0 was released on 16 October 2000, with many major new features including a full garbage collector
  • 15.  Python 3.0 (also known as Python 3000 or py3k was released on 3 December 2008 after a long period of testing.
  • 16. Python has twice been awarded as TIOBE Programming Language of the Year (2007, 2010), which is given to the language with the greatest growth in popularity over the course of the year (as measured by the TIOBE index)
  • 23. Basic Syntax# # comment  \ # line continuation  ; # statement separator (like C) None # NULL  not # logical/boolean not returns True/False == != < > <= >= # equality, relational  is # object identity is not ** # power (x^y)  // # floor division (truncates to integer)
  • 24. float(123) float('123.0') # convert integer/string to float int(1.5) # convert to integer (truncate) bool(x) # convert to booleanhex(15) # convert to string in hex format int('101',2) # convert to int from binary number in string
  • 38. Basis Reserved wordsExpression statements are used (mostly interactively) to compute and write a value, or (usually) to call a procedure (a function that returns no meaningful result; in Python, procedures return the value None).
  • 39. Assert statements are a convenient way to insert debugging assertions into a program.
  • 40. Pass is a null operation — when it is executed, nothing happens. It is useful as a placeholder when a statement is required syntactically, but no code needs to be executed.Deletion of a target list recursively deletes each target, from left to right.
  • 41. Print evaluates each expression in turn and writes the resulting object to standard output .
  • 42. Break may only occur syntactically nested in a for or whileloop, but not nested in a function or class definition within that loop.Continue may only occur syntactically nested in a for or while loop, but not nested in a function or class definition or finally clause within that loop. It continues with the next cycle of the nearest enclosing loop.
  • 43. Import statements are executed in two steps: (1) find a module, and initialize it if necessary; (2) define a name or names in the local namespace (of the scope where the import statement occurs).
  • 44. The global statement is a declaration which holds for the entire current code block. Python ApplicationWeb development *Extensive support for HTML and XML. *E-mail processing. *Processing RSS feeds. *Support for many other Internet protocols.Database Access *MySQL, Oracle, MS SQL Server, PostgreSQL, SybODBC, and others are available for free download.Scientific and Numeric *Bioinformatics *Python course in Bioinformatics *Physics
  • 46. Network Programming *Easy-to-use socket interface *Twisted Python, a framework for asynchronous network programming.Software Development
  • 47. Game and 3D GraphicsPerl
  • 48. Perl is a interpreted and dynamic programming language
  • 49. Perl is stable and cross-platform programming language.
  • 50. It has inherited the best features from C, Basic and other programming languages.
  • 51. Perl supports Unicode character encoding for foreign letters.Other interesting feature is, it supports both procedural and object oriented programming.
  • 52. Perl is extensible and can be integrated with C and C++.
  • 53. Perl is best known for powerful text processing engine.
  • 54. Perlwas known to be the most popular web programming language until PHP supercedes it.HistoryPerl was initially developed by Larry Wall in 1987.
  • 55. Perl is a open source software licensed under GNU public license
  • 56. It was made as a unix scripting language for reporting process.Perl is also called as the swiss army chainsaw of programming languages due to its flexible and adaptable nature.
  • 57. Perl  2 released in 1988 with better and improved regular exprssion engine
  • 58. In 1989, perl 3 was released with added feature of handling binary data streams.In 1991, perl reference documentations has been published, it is also called as ‘Camel Book’ and version was renamed to Perl 4.
  • 59. Perl interpreter was completely rewritten and released in 1994 as Perl verison 5.
  • 60. Perl 5.x version is the most widely used as of nowComparison with Other Programming LanguagesC/C++Perl is written in the C programming language.
  • 61. C/C++ programs are platform dependent.C/C++ is a very structured language, its syntax is not as exible as scripting languages such as Perl.
  • 62. C/C++ version requires more lines of code compared with Perl.
  • 63. improperly written C/C++ programs are vulnerable to memory leak problemsPHPAllows embedding of inline PHP code inside HTML documents that makes it very convenient to embed small snippets of PHP code.
  • 64. PHP supports the object-oriented paradigm, most of its functionalities are provided through functions.Java/JSPJava syntax is very structured and thus are not as fexibleas scripting languages like Perl.
  • 65. Java itself is not just an interpreter, it is a virtual machine over which programmers are totally abstracted from the underlying operating system platformsHow A Perl Program Is ExecutedPreprocessingAn optional preprocessing stage transforms the source file to the final form.Tokenizing The source le is broken down into tokens. This process is called tokenization (or Lexical analysis). Whitespaces are removed. Token is the basic unit that makes up a statement. By tokenizing the input parsing is becoming easier because all further processing are carried out on tokens,independent of whitespace.
  • 66. Parsing & Optimization (Compilation) Parsing involves checks to ensure the program being executed conforms to the language specication and builds a parse tree internally which describes the program in terms of microoperations internal to Perl (opcode).
  • 67. LiteralsNumbers (integers and decimals) * In Perl, integers can be expressed in decimal (base 10), hexadecimal (base 16) or octal (base 8) notation. * Integers cannot be delimited by commas or spaces like 10,203,469 or 20 300. * Exponents (base 10) can also be specied by appending the letter .”e”and the exponent to the real number portion. e.g. 2e3 is equivalent to 2 x 103 = 2000.
  • 68. Strings * A string is a sequence of characters enclosed (delimited) by either double quotes (.) or single quotes('). * Escape characters are usually put insidedouble-quoted strings.
  • 71. scalar variable* Is a named entity representing a piece of scalar data of which thecontent can be modied throughout its lifetime. * all variables are global.Array* a named entity representing a list of scalar data, with each item assigned an index. * An array can be empty, that is, containing no elements (called a null array).
  • 72. Hash * Is a special data structure. It is similar to an array except that the index is not an integer, a string is used for indexing, and is known as a key. The key is conceptually like a tag which is attached to the corresponding value. The key and the value forms a pair (key-value pair).
  • 73. Arithmetic operators manipulate on numeric scalar data. Perl can evaluate an arithmetic expression, in a way similar to our daily-life mathematics.Operator Description+ Addition operator- Subtraction operator* Multiplication operator/ Division operator% Modulus operator+ Positive sign- Negative sign++ Autoincrement operator-- Autodecrement operator** Exponentiation operator
  • 74. Comparison operators are used to compare two pieces of scalar data, e.g. alphabetically or numerically and returns a Boolean value. In Perl, there are two sets of comparison operators. The rst set compares the operands numerically:Operator Description< less than> greater than<= less than or equal to>= greater than or equal to<=> general comparison
  • 75. The second set compares the operands stringwise:Operator Descriptionlt less thangt greater thanle less than or equal toge greater than or equal tocmp general comparison
  • 76. Equality operators compares two pieces of scalar data and returns if their values are identical. They may be considered special cases of comparison operators.Operator Description== equal (numeric comparison)!= not equal (numeric comparison)eq equal (stringwise comparison)ne not equal (stringwise comparison)
  • 77. Bitwise operators provide programmers with the capability of performing bitwise calculations.Operator Description<< Binary shift left>> Binary shift right& Bitwise AND| Bitwise ORˆ Bitwise XOR~ Bitwise NOT
  • 78. Logical operators can be used to do some Boolean logic calculations.Operator Description|| or Logical OR&& and Logical AND! not Logical NOT, i.e. negationxor Logical XOR.Exclusive OR
  • 79. test1 test2 and && or || xortrue true true true falsetrue false false true truefalse true false true truefalse false false false false Test not ! true false false trueTable 4.1: Truth table of various Perl logical operators
  • 80. String manipulation operators manipulate on strings.Operator Descriptionx String repetition operator. String concatenation operator