Jonathan Huelman CSC 415 – Programming Languages

Slides:



Advertisements
Similar presentations
® ® Why Design Another Language? Python UK & ACCU Spring Conference Oxford - April 2, 2003 Guido van Rossum Director of PythonLabs at Zope Corporation.
Advertisements

"The State of the Python Union" Python10 - Alexandria, VA - February 7, 2002 Guido van Rossum Director, PythonLabs at Zope Corporation
Why I Invented Python EuroPython – June 27, 2005 Guido van Rossum Elemental Security, Inc.
State of the Python Union PyCon DC, March 26-28, 2003 Guido van Rossum Director of PythonLabs at Zope Corporation
10/09/1999© 1999 CNRI, Guido van Rossum 1 Computer Programming for Everybody Guido van Rossum CNRI (Corporation for National Research Initiatives, Reston,
Guy Griffiths. General purpose interpreted programming language Widely used by scientists and programmers of all stripes Supported by many 3 rd -party.
‘And Now For Something Completely Different’ Python Programming David Hartwell Clements.
Reasons to study concepts of PL
Python By Steve Wright. What is Python? Simple, powerful, GP scripting language Simple, powerful, GP scripting language Object oriented Object oriented.
Introduction to Python. Outline Python IS ……. History Installation Data Structures Flow of Control Functions Modules References.
Python Jordan Miller and Lauren Winkleman CS 311 Fall 2011.
Introduction to Python (for C++ programmers). Background Information History – created in December 1989 by Guido van Rossum Interpreted Dynamically-typed.
Python Introduction.
Intro to Python Programming (Resources) Pamela A. Moore Zenia C. Bahorski Eastern Michigan University March 7, 2012 A language to swear by, not at. 1.
CSC 110 A 1 CSC 110 Introduction to Python [Reading: chapter 1]
V Avon High School Tech Club Agenda Old Business –Delete Files New Business –Week 18 Topics: Intro to HTML/CSS: Questions? Summer Work Letter.
Startup – Chapter 1.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Intro to Python Programming (Introduction) Pamela A. Moore Zenia C. Bahorski Eastern Michigan University March 7, 2012 A language to swear by, not at.
The Python Language Petr Přikryl Part I Socrates IP, 15th June 2004 TU of Brno, FIT, Czech Republic.
Python 0 Some material adapted from Upenn cmpe391 slides and other sources.
Introduction to Programming Peggy Batchelor.
Washington Area SGML/XML Users Group – 21 June 2000 BeOpen.com 1 Python, XML, and PythonLabs Fred L. Drake, Jr.
Programming language A programming language is an artificial language designed to communicate instructions to a machine,languageinstructionsmachine particularly.
Modules and Decomposition UW CSE 190p Summer 2012 download examples from the calendar.
August 29, 2005ICP: Chapter 1: Introduction to Python Programming 1 Introduction to Computer Programming Chapter 1: Introduction to Python Programming.
The First Pune Python meet organized by PythonThreads.com The First Pune Python meet organized by PythonThreads.com What is it? Python is a Free, Open.
Ch 1. A Python Q&A Session Spring Why do people use Python? Software quality Developer productivity Program portability Support libraries Component.
1 CSC 221: Introduction to Programming Fall 2012 Python data, assignments & turtles  Scratch programming review  Python & IDLE  numbers & expressions.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Python – May 11 Briefing Course overview Introduction to the language Lab.
Intro to Python Programming (Part 1) Pamela Moore Zenia Bahorski Eastern Michigan University March 16, 2011 A language to swear by, not at.
Python. History of python  Python was conceived in the late 1980s and its implementation was started in December 1989 by Guido van Rossum at CWI in the.
Compsci 06/101, Spring Compsci 6/101: PFTW, Feb 28-March 4 l Algorithms and Data Structures  Sets and how they are used in Python (data structure)
Introduction to Python Damian Gordon. The Python Programming Language Python was developed by Guido van Rossum in the Netherlands in Van Rossum.
Python for: Data Science. Python  Python is an open source scripting language.  Developed by Guido Van Rossum in late 1980s  Named after Monty Python.
Ch 1. A Python Q&A Session. Why do people use Python? Software Quality Developer productivity Program portability Support Libraries Component integration.
8 January 2016Birkbeck College, U. London1 Introduction to Programming Lecturer: Steve Maybank Department of Computer Science and Information Systems
Overview of Python Eric Finkenbiner David J. Stucki.
Python  Monty or Snake?. Monty?  Spam, spam, spam and eggs  Dead parrots  Eric Idle, John Cleese, Michael Palin, etc.
Compsci 06/101, Fall Programming Equations l Algorithms + Data Structures = Programs  Niklaus Wirth, old view of programming and compsci l How.
Jeff Howbert Introduction to Machine Learning Winter Machine Learning MATLAB Essentials.
Productive Laziness with Python Programmability in SPSS Albert-Jan Roskam, PhD. Statistics Netherlands (CBS) ASSESS – York UK - October.
 A readable, dynamic, pleasant,  flexible, fast and powerful language Introduction to Python.
1 Programming and problem solving in C, Maxima, and Excel.
Python coding of MULTIPLY’s processing chain Ioannis Binietoglou National Institute for R&D in Optoelectronics, Bucharest, Romania National Observatory.
CSCE 343 – Programming Language Concepts Welcome!.
First appeared Features Popular uses Basic This language emphasises on ease of use, allowing general purpose programming to those with a small amount of.
Introduction to Programming
Python Programming Unit -1.
CST 1101 Problem Solving Using Computers
CSC391/691 Intro to OpenCV Dr. Rongzhong Li Fall 2016
NOCTI Study Guide #2.
Intro To Pete Alonzi University of Virginia Library
1.1 Reasons to study concepts of PLs
Python Training in Chennai
Introduction to Programming
Introduction to Programming
Python Training Classes
SVTRAININGS. SVTRAININGS Python Overview  Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed.
Do you know this browser?...
Introduction to Python programming
Introduction to Python
Brief Intro to Python for Statistics
Introduction to Programming
THE REAL WORLD APPLICATIONS OF PYTHON. INTRODUCTION Python is an interpreted, high-level, general-purpose programming language. Created by Guido van Rossum.
Chapter 1: Programming Basics, Python History and Program Components
FEATURES OF PYTHON.
Presentation transcript:

Jonathan Huelman CSC 415 – Programming Languages Python Jonathan Huelman CSC 415 – Programming Languages

Introduction to Python Defined as a very high-level scripting language, there isn’t a lot Python can’t do with it’s extensive standard library “Batteries included” Python is interpreted, meaning each line is indirectly executed. There is no byte code Named for Monty Python’s Flying Circus, the British sketch comedy TV show

Release dates for the major versions: History of Python Guido Van Rossum, BDFL (Benevolent Dictator For Life) Python based on ABC, first created in the late 1980s The Python Software foundation launched in March 2006 with Van Rossum as President. It is a non-profit organization dedicated to the Python programming language Release dates for the major versions: Python 1.0 - January 1994 Python 2.0 - October 16, 2000 Python 3.0 - December 3, 2008

Who Uses Python Graphics Games Web Development Mathematical libraries Industrial Light and Magic Walt Disney Feature Animation Games Battlefield 2 Civilization 4 Web Development Yahoo Maps Google Linux Weekly News Mathematical libraries Matplotlib, which is like MATLAB NumPy, a language extension that adds support for large and fast, multi-dimensional arrays and matrices PyIMSL Studio is a Python distribution which includes the IMSL Numerical Libraries.

The Zen of Python >>> import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! >>> 1. Idioms are frequently not straightforwardly portable from another programming language. For example, the idiomatic way to perform an operation on all items in a list in C looks like this: 2. The direct equivalent in Python would be this: 3. That, however, while it works, is not considered Pythonic. It's not an idiom the Python language encourages. We could improve it. A typical idiom in Python to generate all numbers in a list would be to use something like the built-in range() function: 4. This is however not Pythonic either. Here is the Pythonic way, encouraged by the language itself:

‘Pythonic’ Code for (i=0; i < mylist_length; i++) { do_something(mylist[i]); } i = 0 while i < mylist_length: do_something(mylist[i]) i += 1 for i in range(mylist_length): do_something(mylist[i]) for element in mylist: do_something(element)

The Size of Python http://docs.python.org/library/

Example – Regular Expressions

More Examples http://wiki.python.org/moin/SimpleProgra ms http://code.activestate.com/recipes/5779 05-password-generator/?in=lang-python Primes program beers on the wall and a more ‘pythonic’ version Guessing game

Pros on Python Why Reddit uses Python “The biggest thing that has kept us on Python … ... One are the libraries. There’s a library for everything. We’ve been learning a lot of these technologies and a lot of these architectures as we go. The other thing that keeps us on Python, and this is the major thing, is how readable and writable it is. When we hire new employees ... it’s awesome because I can see from across the room, looking at their screen, whether their code is good or bad. Because good Python code has a very obvious structure.” - Steve Huffman, Web Developer, Co-Founder of Reddit.com

Evaluation very clear, readable syntax, once you get used to the fact that indentation is key to syntax intuitive object orientation natural expression of procedural code full modularity, supporting hierarchical packages exception-based error handling very high level dynamic data types extensive standard libraries and third party modules for virtually every task embeddable within applications as a scripting interface free, with relatively cheap IDEs available on the Internet

Sources http://faassen.n--tree.net/blog/view/weblog/2005/08/06/0 http://brainsik.theory.org/.:./2009/why-reddit-uses-python http://www.yak.net/fqa/171.html http://www.python.org/ http://en.wikipedia.org/wiki/Python_(programming_language)