6.189 | January IAP 2011 | Undergraduate

A Gentle Introduction to Programming Using Python


If you are working on your own machine, you will probably need to install Python. We will be using the standard Python software, available here. You should download and install version 2.6.x, not 2.7.x or 3.x. All MIT Course 6 classes currently use a version of Python 2.6.

Homework 1 Handout (PDF)

Written exercises (PDF)

Code template (PY)
Homework 2 Handout (PDF)

Written exercises (PDF)

Code template (PY)

nims.py (PY)

strings_and_lists.py (PY)

Project 1: Hangman Handout (PDF)

hangman_template.py (PY)

words.txt (TXT)

Optional extension:

hangman_lib.py (PY)

hangman_lib_demo.py (PY)

Homework 3 Handout (PDF)

Written exercises (PDF)

Code template (PY)
Homework 4 Handout (PDF)

Written exercises (PDF)

Graphics module documentation (PDF)

graphics.py (PY) — be sure to save this in the same directory where your code is saved!

wheel.py (PY)

rgb.txt (TXT)

The graphics.py package and documentation are courtesy of John Zelle, and are used with permission.

Project 2: Conway’s game of life Handout (PDF)

game_of_life_template.py (PY) — download and save as game_of_life.py; be sure to save in the same directory as graphics.py

Final project: Tetris

Handout (PDF)

tetris_template.py (PY) — Download and save it in the same directory as graphics.py. Please edit this file, and place your code in the sections that say “YOUR CODE HERE”.

Course Info

As Taught In
January IAP 2011
Learning Resource Types
Lecture Notes
Programming Assignments