In the first lab of the course we will first install all the necessary software on the computer, and then we'll start using Python.
These instructions are for Microsoft Windows users. All necessary software is also available for Linux and Mac OS X, but there are no instructions here. In class, I will mostly use Linux.
On 64-bit Windows machines, use python-2.6.4.amd64.msi instead.
When the installation asks for the Destination Directory,
keep the default C:\Python26\
. Do not change anything on the
customization page.
Download the Wing IDE 101 wingide-101-3.2.3-1.exe (original here) and install it.
On 64-bit Windows machines, use PIL-1.1.7.win-amd64-py2.6.exe instead.
Download the zip file
cs101-20100415.zip and store it
on your desktop. Then right-click the file icon, and
select Extract. When it asks for a directory, select the
directory C:\Python26\Lib\site-packages
.
Congratulations--you have installed all the necessary software! Now it’s time for you to do some programming. To earn your lab marks, you must actively participate in each lab.
We will ask you to do pair programming during the labs. Pair programming is used in software design (for instance, it is part of "Extreme Programming"), and you can find an explanation of the benefits of pair programming on Wikipedia--but read that later!
We will use the terms driver and navigator. Here are the definitions of the two roles:
The two members of a team should switch roles every 15 minutes or so.
Today we will just learn how to use the Wing IDE 101, how to run Python code interactively from the Python shell, how to write a Python program (also called a script), and about basic Python syntax--including putting comments in your script.
We make use of the robot examples in the robot lecture notes. By the end of the lab, you should be able to do everything described in the lecture notes up to Section 4 ("Write programs for humans").