Top Banner
Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland
23

Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Introduction to Python

John Alexis Guerra GómezCMSC433 Spring 2010University of Maryland

Page 2: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Definition

Python is an easy to learn, powerful programming language.

It has efficient high-level data structures and a simple but effective approach to object-oriented programming.

Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting and rapid application development in many areas on most platforms.

Page 3: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

More definition

Python is cross platform (for many platforms). The standard library is huge, very useful, and is

very well documented. http://docs.python.org/library/

Many companies make significant use of it Google uses it for a lot of their internal software

projects David Bagget (speaking Tuesday) uses it in his start

up company

Page 4: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

The Interactive mode

aguerra@eltiestico2:~$ python

Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41)

[GCC 4.3.3] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> print "Hola mundo"

Hola mundo

Page 5: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Working with a file

Save your file as hola.py Run it with

python hola.py

Page 6: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Basic types

• Numbers

• Strings

• Lists

• Tuples

• Maps

• Functions

Page 7: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Basic Data Types

Page 8: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Lists

Page 9: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Tuples

Page 10: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Dictionaries

Page 11: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Functions

Page 12: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Functional Programming

Page 13: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Lists Comprehension

Page 14: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

From Java to Python

http://www.razorvine.net/python/PythonForJavaProgrammers

Page 15: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Google's developers Python Lecture

http://www.youtube.com/watch?v=tKTZoB2Vjuk

Page 16: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Some other things

One of the things that I really like of Python is that you can use it for almost anything

Page 17: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

You like video games

http://www.pygame.org http://home.gna.org/oomadness/en/soya3d/inde

x.html

Page 18: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Scientific Work

http://www.scipy.org/ http://matplotlib.sourceforge.net/

Page 19: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Web developing

http://www.djangoproject.com/ http://turbogears.org/

Page 20: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Database Access

http://www.sqlobject.org/

Page 21: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

GUI Development

http://www.wxpython.org/ http://www.pygtk.org/ http://wiki.python.org/moin/PyQt

Page 22: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

Image manipulation

http://www.pythonware.com/products/pil/

Page 23: Introduction to Python John Alexis Guerra Gómez CMSC433 Spring 2010 University of Maryland.

More

http://wiki.python.org/moin/UsefulModules