The Python Programming Language Jeff Myers Programming Language Concepts, 01/14/2002

Slides:



Advertisements
Similar presentations
+ CS1001. Python. November 14 th, Scripting languages Scripting languages foster an exploratory, incremental approach to writing code Historically.
Advertisements

Introduction to Python Week 15. Try It Out! Download Python from Any version will do for this class – By and large they are all mutually.
Python Mini-Course University of Oklahoma Department of Psychology Day 4 – Lesson 15 Tuples 5/02/09 Python Mini-Course: Day 4 – Lesson 15 1.
Intro to Python Welcome to the Wonderful world of GIS programing!
A Crash Course Python. Python? Isn’t that a snake? Yes, but it is also a...
Intro to Python. Python is an interpreted language Can be used interactively Identifiers are case-sensitive Operators: + - * / ** Arbitrarily large integer.
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?
Python: a modern hybrid A language for scripting and prototyping Balance between extensibility and powerful built-in data structures genealogy: –Setl (NYU,
Python By Steve Wright. What is Python? Simple, powerful, GP scripting language Simple, powerful, GP scripting language Object oriented Object oriented.
Ruby The Gem of new programming languages. An interpreted scripting language.
Scripting languages Typically a language used for short programs to manage other programs. Interpreted, dynamically typed, permissive semantics Usually.
Python Brandon Jeffcoat Dashaun West “Why settle for snake oil when you can have the whole snake?” -- From Usenet posting by Mark Jackson, June 1998.
Introduction to Python. Outline Python IS ……. History Installation Data Structures Flow of Control Functions Modules References.
Introduction to Python
Python Jordan Miller and Lauren Winkleman CS 311 Fall 2011.
Chapter 2 Writing Simple Programs
Intro to Python Paul Martin. History Designed by Guido van Rossum Goal: “Combine remarkable power with very clear syntax” Very popular in science labs.
The Python Programming Language Matt Campbell | Steve Losh.
CSC 9010: Natural Language Processing
Introduction to Python (for C++ programmers). Background Information History – created in December 1989 by Guido van Rossum Interpreted Dynamically-typed.
Python.
Programming 101 with Python: an open-source, cross-platform, and fun language By J. Burton Browning, Ed.D. Copyright © J. Burton Browning All rights reserved.
Introduction to Python Lecture 1. CS 484 – Artificial Intelligence2 Big Picture Language Features Python is interpreted Not compiled Object-oriented language.
Introduction to Scripting Languages: Python Some slides are based upon Python Documentation - Extended.
SCRIPTING IN RUBY By Amber Bennett “Ruby is simple in appearance, but is very complex inside, just like our human body.” --Yukihiro Matsumoto.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Session 2 Wharton Summer Tech Camp 1: Basic Python 2: Start Regex.
Computer Science 111 Fundamentals of Programming I Overview of Programming.
Python 0 Some material adapted from Upenn cmpe391 slides and other sources.
1 Python CIS*2450 Advanced Programming Concepts Material for this lecture was developed by Dr. D. Calvert.
Introduction to PythonIntroduction to Python SPARCS `08 서우석 (pipoket) `09 Summer SP ARCS Seminar`09 Summer SP ARCS Seminar.
Python Lists and Such CS 4320, SPRING List Functions len(s) is the length of list s s + t is the concatenation of lists s and t s.append(x) adds.
An Introduction to Python Blake Brogdon. What is Python?  Python is an interpreted, interactive, object-oriented programming language. (from python.org)
A very basic overview of Server-Side Scripting Or what is PHP, Perl, Python, Ruby and what can they do for me?
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Intro to Python Adriane Huber Debbie Bartlett Python Lab #1Python Lab #1 1.
Perl Language Yize Chen CS354. History Perl was designed by Larry Wall in 1987 as a text processing language Perl has revised several times and becomes.
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.
Python Overview  Last week Python 3000 was released  Python 3000 == Python 3.0 == Py3k  Designed to break backwards compatibility with the 2.x.
An Introduction. What is Python? Interpreted language Created by Guido Van Rossum – early 90s Named after Monty Python
CS105 Computer Programming PYTHON (based on CS 11 Python track: lecture 1, CALTECH)
By: Ben Hester. What is Python Powerful Dynamic Programming Language Uses Whitespace Everything Is A Object Very Portable.
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.
Data Collections CS 127. Lists Lists are ordered sequences of items All programming languages provide a sequence structure similar to a Python list; in.
Python  Monty or Snake?. Monty?  Spam, spam, spam and eggs  Dead parrots  Eric Idle, John Cleese, Michael Palin, etc.
The Python Language Petr Přikryl Part IIb Socrates IP, 15th June 2004 TU of Brno, FIT, Czech Republic.
I NTRODUCTION TO PYTHON - GETTING STARTED ( CONT )
 A readable, dynamic, pleasant,  flexible, fast and powerful language Introduction to Python.
Introduction to Scripting Languages: Python Some slides are based upon Python Documentation - Extended.
PYTHON PROGRAMMING. WHAT IS PYTHON?  Python is a high-level language.  Interpreted  Object oriented (use of classes and objects)  Standard library.
Python Programming Language by Vasu Chetty. Origins of Python Created by: Guido van Rossum, a Dutch Programmer Created during: Christmas Break, 1989 Created.
Chapter 2 Writing Simple Programs
Python Programming Unit -1.
Intro To Pete Alonzi University of Virginia Library
Python Training in Chennai
Python is a general-purpose interpreted, interactive, object-oriented, and high-level programming language. It was created by Guido van Rossum during.
1 Python Lab #1 Intro to Python Adriane Huber Debbie Bartlett.
Introduction to Python
Introduction to Python
PYTHON Varun Jain & Senior Software Engineer
Introduction to Python
Introduction to Python
THE REAL WORLD APPLICATIONS OF PYTHON. INTRODUCTION Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum.
Lecture 7: Python’s Built-in Types and Basic Statements
Python Basics. Topics Features How does Python work Basic Features I/O in Python Operators Control Statements Function/Scope of variables OOP Concepts.
Python Reserved Words Poster
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

The Python Programming Language Jeff Myers Programming Language Concepts, 01/14/2002

Python Overview Scripting Language Object-Oriented Portable Powerful Easy to learn and use Mixes good features from Java, Perl and Scheme

Major Uses of Python System Utilities GUIs (Tkinter, gtk, Qt, Windows) Internet Scripting Embedded Scripting Database Programming Artificial Intelligence Image Processing

History of Python Created in 1990 by Guido van Rossum Named after Monty Python First public release in 1991 comp.lang.python founded in 1994 Open source from the start

Language Features Object-Oriented Interpreted Interactive Dynamic Functional Highly readable

Built-in Object Types Numbers , 1234, 999L, 3+4j Strings - 'spam', "guido's" Lists - [1, [2, 'three'], 4] Dictionaries - {'food':'spam', 'taste':'yum'} Tuples - (1, 'spam', 4, 'U') Files - text = open ('eggs', 'r'). read()

Operators Booleans: and or not = > == != <> Identity: is, is not Membership: in, not in Bitwise: | ^ & ~ No =, etc.

String Operators Concatenation: + Repeat: * Index: str[i] Slice: str[i:j] Length: len( str ) String Formatting: "a %s parrot" % 'dead‘ Iteration: for char in str Membership: ‘m’ in str

Common Statements Assignment - curly, moe, larry = 'good', 'bad', 'ugly' Calls - stdout.write("spam, ham, toast\n") Print - print 'The Killer', joke If/elif/else - if "python" in text: print text For/else - for X in mylist: print X While/else - while 1: print 'hello' Break, Continue - while 1: if not line: break Try/except/finally - try: action() except: print 'action error'

Common Statements Raise - raise endSearch, location Import, From - import sys; from sys import stdin Def, Return - def f(a, b, c=1, d): return a+b+c+d Class - class subclass: staticData = [] Global - function(): global X, Y; X = 'new' Del - del data[k]; del data [i:j]; del obj.attr Exec - yexec "import" + modName in gdict, ldict Assert - assert X > Y

Samples System Utility Functional Programming Object Oriented networking

References Python homepage: Jython homepage: Programming Python and Learning Python: This presentation is available from