The iPython notebooks and sample code for Introductory Python courses
You're in the right place if you're looking for the material for one of the following courses:
- Georgetown University: XBUS-500 Foundations of Data Analytics and Data Science
- District Data Labs: Python for new Programmers
- District Data Labs: Building Python Data Apps
The Workshop.pynb
can be viewed on the iPython nbviewer application by using the following link: nbviewer Intro to Python. If you'd like to run an interactive version of the notebook you must have iPython installed, then simply run:
$ ipython notebook Workshop.pynb
After cloning or downloading the repository to a working directory.
The example program that we discussed in class, clock.py
is a simple program that I use every day to print out formatted timestamps for use in the documents that I'm preparing. It is also a simple program for instruction purposes. You can run this program by:
$ python clock.py code
Mon Mar 10 08:43:26 2014 -0400
To see more formatting options, use python clock.py help
.
The outline of the Workshop is as follows:
- Prerequisites
- Learning how to learn how to program
- Interactivity
- Calculation
- Comparison
- Conditionality
- TODO: Logic (and None)
- Repetition
- Functions
- Data Structures (add tuple)
- Object Oriented Programming
- Case Study: A Time Formatter
- Add Logic section
- Discuss immutable vs mutable types
- Add tuple and set to data structures discussion
- Make OO section better
- Add string formatting section
- Discuss stub and generic arguments in function section
The materials in this repository are licensed under an Apache2 License, which simply states that you may copy and use this code as you like, including for a commercial use with or without modifications. You cannot, however, use any trademark in this package or hold us liable for any content. Finally, if you do choose to use the material you must include the Apache2 license, state any changes, and include our copyright notices.