1. Introduction to Python
A readable, dynamic, pleasant,
flexible, fast and powerful language
Suraj Shah
ssshah22@asu.edu
(Adopted from Nowell Strite’s slides)
3. What is Python
•Multi-purpose (Web, GUI, Scripting, etc.)
•Object Oriented
•Interpreted
•Strongly typed and Dynamically typed
•Focus on readability and productivity
4. Features
• Batteries Included
• Everything is an Object
• Interactive Shell - IPython
• Cross Platform
• CPython, Jython, IronPython, PyPy
5. Who Uses Python
• Google
• Quora
• NASA
• Mozilla
• the ONION
• ...the list goes on...
6. Releases
• Created in 1989 by GuidoVan Rossum
• Python 1.0 released in 1994
• Python 2.0 released in 2000
• Python 3.0 released in 2008
• Python 2.7 is the recommended version
• 3.0+ adoption will take a few years
49. Python’s Way
• No interfaces
• No real private attributes/functions
• Private attributes start (but do not end)
with double underscores.
• Special class methods start and end with
double underscores.
• __init__, __doc__, __cmp__, __str__
50. Imports
• Allows code isolation and re-use
• Adds references to
variables/classes/functions/etc. into current
namespace
62. Going Further
• Decorators – Out of our scope!
• Context Managers – Out of our scope!
• Lambda functions
• Generators – Out of our scope!
63. Miscellaneous
• Dynamic Programming - is a method for
solving a complex problem by breaking it
down into a collection of simpler
subproblems, solving each of those
subproblems just once, and storing their
solutions
65. Let’s Code!
• Download repo from
https://github.com/SurajShah525/pythonprgrammin
• Preferably use Ubuntu/iOS for this to work
• Use Pip – python package management
• Follow the instructions in the readme