Date
and Topic |
Readings
and References |
Lecture
Notes |
Downloads
|
Assigned
Work |
1/14 : Welcome to the course |
If you're
interested in learning more about HTML and Web page design, there are
many tutorials and references on the Web--this one looks
like a pretty decent collection. Scientifc American article on the Music ID program Shazam. If you're working from a computer on campus, you can go to this site and type 'Name That Tune' in the form. (I can't post the article here because of copyright restrictions.) The 20Q game. |
Introduction
to the course |
Text
Editor |
Lab
0 do ASAP Lab 1 due January 26 Lab 1 Solutions |
1/21: Representing Information, bits and
bytes. How text is encoded as bits. |
Representing
Information Bits and Bytes from the HowStuffWorks Website. |
|||
1/26 How numbers are encoded as bits. |
Representing Numbers with Bits. | Binary
Editor |
||
1/28 Using the Binary Editor How sound is encoded as bits |
In-class
exercise
with Binary Editor Sample Text File Sample Audio File Lab 2, due February 4. Lab2 Solutions |
|||
2/2 More on sound. Images |
The
Digital World
(long version). The Digital World (slides). |
Homework
problems 1. Homework 1 Solutions |
||
2/4 More on images. Lossless compression |
How File
Compression Works (from the HowStuffWorks website). Lecture Notes on Data Compression |
Sample Data Text: The Tell-tale Heart Random ASCII characters Images: ![]() Hiroshige, Shoal of Fishes ![]() Miro, Singing Fish ![]() ![]() Blue Sounds: Flute Square Wave |
Lab
3, due February 11. Lab 3 Solutions |
|
2/11 More compression. Introduction to Python and JES |
Link
to JES Downloads |
Lab
4, due February 23. Lab 4 Solutions. |
||
2/16 Starting Python |
The basic reference is the Help included with
JES. You can find a large number of python tutorials here.
This is a particularly
good one. If you use these tutorials, ignore the beginning steps concerning installation. And note that ALL of our programs in JES will begin with the def keyword, so there may be some discrepancy with the sample programs in the tutorials, which allow saved scripts that are not function definitions |
Sample python programs. (You can download these and run them
in JES. Experiment with modifying these programs.) Convert Temperatures (FtoC.py) Open and Display a Picture (pickAndShow.py) Modify a few pixels in a picture (setCenterWhite.py) |
Lab
5, due February 26 Solutions: CtoF.py makeRedder.py |
|
2/23 Looping through the pixels in a picture. Functions with
parameters. Looping through
a range of integers. |
Modify
all the pixels in
a
picture. (makeRed.py) Brightening a picture. (brighten.py) Creating a mirror image, and doing it wrong! (mirror.py) Creating a mirror image, and doing it right by copying to a separate picture. (mirror2.py) Scaling a picture to half size. (scale_half.py) Illustration of functions with parameters and return values: distance between two points. (dist_demo.py) Functions with parameters for scaling pictures. (scale_demo.py) Illustration of looping over a range. (looprange.py) Creating a mirror image, and doing it right by interchanging pixel colors in place. (mirror3.py) Painting a big white square in the middle of a picture. (setCenterWhite2.py) |
Lab 6, due March 16. Solution to rotation problem. Solution to yellow/red square problem. |
||
3/9 Logical expressions and operators, if statement and its
relatives. |
Midterm Review |
Illustration of conditional statements with programs for
computing income tax: tax1.py tax2.py tax3.py If statement in image-processing: The function we used to turn Cookie Monster red. (blue_to_red.py) Increase the contrast of an image. (increase_contrast.py) |
Lab 7, due March 25. Solution to Maximum-of-3 problem. Solution to sepia tinting problem. Solution to collage problem. |
|
3/18 Midterm Exam |
Midterm with Solutions |
|||
3/25 Functions for Drawing in
JES. The function random(). |
Drawing of a partially filled-in
tictactoe board. (tictactoe.py) Smiley Face (HaveANiceDay.py) A simulated coin-tossing experiment. (cointoss.py) Uniformly distributed random dots in the plane. (random_dots.py) A randomly colored checkerboard. (random_check.py) |
Lab 8, due April 6 |
||
4/1 Strings. The while
statement. |
An illustration of many of the
ways of manipulating strings in python. (stringstuff.py) Conversion of a binary string to an integer. (convert_from_binary.py) Conversion of an integer to a binary string. (convert_to_binary.py) |
|||
4/6 Python Lists |
An illustration of many of the
ways of manipulating lists in python. (liststuff.py) A program for creating and displaying a slide show. (classpix.py) A program for generating random sentences. (word_soup.py) |
|||
4/13 The Internet |
How
Internet Infrastructure Works, from the "How Stuff Works" website. How the Internet Works--a good explanation of Internet infrastructure, packets, IP addresses, and domain name resolution, and application protocols. |
A program that illustrates
reading from and writing to files.(read_write_files.py) A program that generates a (very minimal) web page. (generateWebPage.py) A program that generates a more substantial web page. (generateWebPage2.py) A bio file used in preparing a web page with the preceding example. The image file used to prepare the page. The resulting web page. (This doesn't display properly because the link to the picture refers to the directory system on the computer where the program was run.) |
Lab 9,
due April 24 |
|
4/20 Using Python to Extract
Information from Websites |
A very crude program that
contacts a website for stock price information. (getStockPrice.py) A refinement of this same program, that uses specific information about the format of the web page. (getStockPrice2.py) A program to compute the Dow Jones Industrial. Average, using the stock price function above. (DowJones.py) A program for computing the distance between two points on the earth, given their latitude and longitude. (greatCircleDistance.py) |
Lab 10,
due May 1 |
||
Final Exam Review |
Review
Problems |