Thursday 9 a.m.–12:30 p.m.

Python 101

Simon Lau

Audience level:
Novice
Room:
Lecture Room E4

Description

This half-day tutorial presents the basics of Python to beginning and intermediate programmers. It pairs well with ''Python 102'' which follows a similar outline but goes much deeper.

Abstract

Rather than starting with "Hello, world!", we use the interactive Python interpreter shell to get hands-on familiarity with much of core Python before covering blocks and scripts. The tutorial is divided into short sections, each with presentation and hands-on exercises, to quickly cover lots of ground. Advanced topics are introduced throughout and covered in "extra credit" exercises such that more advanced participants can learn at their own pace.

Intended Audience

Programmers with experience in other languages who want a fast hands-on introduction to Python. Content will target both Python 3.1 and 2.7.

Requirements

Bring a laptop computer with Python 2.7 or 3.1 installed. Try to get as much of an overview of Python before the tutorial as you have time to in order to get more out of the tutorial. Two angles on this are the Python Quick Reference and the Python website's tutorial.

Class Outline

  • Numbers and operators
  • Strings - immutability, operators, methods, functions, and formatting
  • Introspection/Discovery
  • Tuples and Lists
  • List Comprehensions
  • Objects and Names
  • Dictionaries
  • Loops and Blocks
  • Iterables
  • Generator Expressions
  • Functions
  • Generators
  • Namespaces
  • Simple Classes
  • Exceptions