Python Programming Language by Vasu Chetty. Origins of Python Created by: Guido van Rossum, a Dutch Programmer Created during: Christmas Break, 1989 Created.

Slides:



Advertisements
Similar presentations
Optional Static Typing Guido van Rossum (with Paul Prescod, Greg Stein, and the types-SIG)
Advertisements

Intro to Scala Lists. Scala Lists are always immutable. This means that a list in Scala, once created, will remain the same.
I210 review Fall 2011, IUB. Python is High-level programming –High-level versus machine language Interpreted Language –Interpreted versus compiled 2.
What is a scripting language? What is Python?
Reasons to study concepts of PL
Introduction to Python. Outline Python IS ……. History Installation Data Structures Flow of Control Functions Modules References.
Intro to Python Paul Martin. History Designed by Guido van Rossum Goal: “Combine remarkable power with very clear syntax” Very popular in science labs.
Programming in Scala Chapter 1. Scala: both object-oriented and functional Scala blends –object-oriented and –functional programming in a –statically.
1 Type Type system for a programming language = –set of types AND – rules that specify how a typed program is allowed to behave Why? –to generate better.
The Python Programming Language Matt Campbell | Steve Losh.
Types in programming languages What are types, and why do we need them? Types in programming languages1.
Java Course Outline Kumar Harshit, USW. Course Description Teaches students to program using the Java programming language with the help of the Netbeans.
Introduction to Python (for C++ programmers). Background Information History – created in December 1989 by Guido van Rossum Interpreted Dynamically-typed.
Python Control of Flow.
Language Evaluation Criteria
CSM-Java Programming-I Spring,2005 Objects and Classes Overview Lesson - 1.
EECE 310: Software Engineering Lecture 2: Understanding Objects in Java and Types.
Computing Science 1P Lecture 21: Friday 20 th April Simon Gay Department of Computing Science University of Glasgow 2006/07.
CSC3315 (Spring 2009)1 CSC 3315 Programming Languages Hamid Harroud School of Science and Engineering, Akhawayn University
1 Python CIS*2450 Advanced Programming Concepts Material for this lecture was developed by Dr. D. Calvert.
Programming Language C++ Xulong Peng CSC415 Programming Languages.
Dan Johnson.  Functional language that started development in  Committee designed language  Pure and Lazy  Compiled or Interpreted  Named after.
CSC 580 – Theory of Programming Languages, Spring, 2009 Week 9: Functional Languages ML and Haskell, Dr. Dale E. Parson.
An Introduction to Python Blake Brogdon. What is Python?  Python is an interpreted, interactive, object-oriented programming language. (from python.org)
Chapter 6 Programming Languages © 2007 Pearson Addison-Wesley. All rights reserved.
Introduction to Object Oriented Programming CMSC 331.
Functional Programming With examples in F#. Pure Functional Programming Functional programming involves evaluating expressions rather than executing commands.
Getting Started with Python: Constructs and Pitfalls Sean Deitz Advanced Programming Seminar September 13, 2013.
Introducing Python CS 4320, SPRING Resources We will be following the Python tutorialPython tutorial These notes will cover the following sections.
C463 / B551 Artificial Intelligence Dana Vrajitoru Python.
Copyright © 2015 Pearson Education, Inc. Chapter 6: Programming Languages.
Types in programming languages1 What are types, and why do we need them?
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
I Power Higher Computing Software Development High Level Language Constructs.
An Introduction. What is Python? Interpreted language Created by Guido Van Rossum – early 90s Named after Monty Python
1 Alex Proctor and Brian Lee for CSCI 431 at UNCA, Fall 2002 ML (Meta Language) a brief introduction Alex Proctor and Brian Lee For CSCI 431 at the University.
Python Primer 1: Types and Operators © 2013 Goodrich, Tamassia, Goldwasser1Python Primer.
Objective-C Drew Cheng CS420. Overview True superset of ANSI C Object-Oriented methods from SmallTalk There is no formal written standard for the language.
RUBY by Ryan Chase.
Jim Havrilla. Invoking Python Just type “python –m script.py [arg]” or “python –c command [arg]” To exit, quit() or Control-D is used To just use the.
By Austin Laudenslager AN INTRODUCTION TO PYTHON.
PHP vs. Python. Similarities are interpreted, high level languages with dynamic typing are Open Source are supported by large developer communities are.
Duke CPS From C++ to Java l Java history: Oak, toaster-ovens, internet language, panacea l What it is ä O-O language, not a hybrid (cf. C++)
C H A P T E R T H R E E Type Systems and Semantics Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
© 2006 Pearson Addison-Wesley. All rights reserved 1-1 Chapter 1 Review of Java Fundamentals.
 A readable, dynamic, pleasant,  flexible, fast and powerful language Introduction to Python.
1 n Object Oriented Programming. 2 Introduction n procedure-oriented programming consists of writing a list of instructions and organizing these instructions.
Winter 2016CISC101 - Prof. McLeod1 CISC101 Reminders Quiz 3 next week. See next slide. Both versions of assignment 3 are posted. Due today.
Euphoria Programming Language CSC 507 Kasilingam Vimalan.
Functional Processing of Collections (Advanced) 6.0.
Python Joseph Eckstrom, Benjamin Moore, Willis Kornegay.
Python : highlights Based on T. K. Prasad’s slides.
Heath Carroll Bill Hanczaryk Rich Porter.  A Theory of Type Polymorphism in Programming ◦ Robin Milner (1977)  Milner credited with introducing the.
Programming in Go(lang)
Scientific Programming in Python -- Cheat Sheet
Introduction Python is an interpreted, object-oriented and high-level programming language, which is different from a compiled one like C/C++/Java. Its.
CS-104 Final Exam Review Victor Norman.
Lecture 10 Data Collections
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by Guido van Rossum during.
What Is a Program? A program is like an algorithm, but describes a process that is ready or can be made ready to run on a real computer Retrieved from:
Arithmetic operations, decisions and looping
Introduction to Python
Java Programming Language
CS190/295 Programming in Python for Life Sciences: Lecture 6
CSC1018F: Intermediate Python
Python Tutorial for C Programmer Boontee Kruatrachue Kritawan Siriboon
Python Primer 1: Types and Operators
(more) Python.
Python Basics. Topics Features How does Python work Basic Features I/O in Python Operators Control Statements Function/Scope of variables OOP Concepts.
Presentation transcript:

Python Programming Language by Vasu Chetty

Origins of Python Created by: Guido van Rossum, a Dutch Programmer Created during: Christmas Break, 1989 Created because: Guido had some free time and an idea for an interpreter Named after:

Python Through the Ages Version 0: Inheritance, exception handling, functions, and core data types of list, str and dict Version 1: Lambda, reduce(), filter(), and map() Version 2: Garbage collection and generators Version 3: Unification of str/unicode types, statements switched to function calls, and instances of list replaced by views and iterators

Why Python? Freely available Well-documented Fosters rapid development Very high-level object-oriented language Integration facilities for mixed-language development

Who uses Python? Google (e.g. code.google.com was written in Python) New York Stock Exchange (web-based transaction system) YouTube NASA Other common uses include: RSS readers, CGI applications, generating and analyzing logs, and creating HTML calendars

Python Programming Paradigms (say that 10 times fast) Object-oriented Iterative (generators) Imperative (follows sequential steps) Functional (lambda calculus)

Common Data Types and Elements Numbers: integer, floating point, complex Other: boolean, none, string, tuple, list, dictionary, set Conditionals: if, else, elif Loops: while, for Supports: nested loops, function calls from other functions, string concatenation, combined boolean, string, or integer in conditional with “and” or “or”

Functions in Python Functions are essentially objects, making them very flexible Functions are considered as first class, so they can be passed to and from other functions Return values need not be set, return none statements are implicitly built in Functions can be nested within other functions

Pass-by-value or Pass-by-reference All parameters in Python are pass-by-reference, but some appear to act as pass-by-value because of the difference between mutable and immutable objects String, tuples and numbers are immutable, altering them will create a new instance Lists and dictionaries are mutable, altering them will also change the original object

Type Checking: Dynamic and Strong Python has dynamic type checking, which means all types are resolved at run-time rather than at compile time Python uses strong type checking, ensuring type errors are thrown for mismatches in type As of version 3, Python no longer supports type coercion Static type inference is not possible in Python

Object-orientedness Python supports multiple inheritance Python utilizes static variable and static method inheritance Super(), in version 3 of Python, is invoked dynamically and calls the superclass method of the same name

Conclusion Python is an easy-to-use, robust programming language that is freely available Python’s objects and functions are very versatile Python is a very high-level object-oriented language Python is awesome!