On homeworks, you are encouraged to collaborate with your fellow students. However, if you do work with others, you must list the people you worked with in the "Notes to TA" area of the JES turnin window.
Homework 1:
Write a program named hw1 to accept a picture as input, and change its pixels as follows:
Set the green component to 125% of its current value
Replicate the splicing example to create the sound "We the UNITED people of the United States," but normalize the word "UNITED." Look for the maximum sample just in that word, compute the multiplier, and apply it just to that word. Call your function louderSplice.
Create a collage of the same image at least three times fit onto the 7x9.5in blank JPEG. (You are welcome to add additional images, too.) You can do any of
scaling the image,
cropping the image,
creating a negative of the image,
shifting or altering colors on the image,
and making it darker or lighter.
Turn in your code, your original image (or images), and your resultant image as "hw3".
Given a folder with images in it, create an index HTML page with links to each image.
You will write a function called linksPage that takes a string which is the path to a directory. You will create a page in that folder named index.html. Index.html should be an HTML page containing a link to every JPEG file in the directory. The anchor in the link should be a small version of the image, 100 pixels high.
Turn in your program via JES as "hw4". The function name should be "linksPage" and the program file name should be "hw4.py".
Build an animation of at least three seconds in duration (30 frames at 10 fps, or 75 frames at 25 frame per second). You must have at least two things in motion during this sequence. You must use at least one composited image (a JPEG image that you scale (if necesary) and copy into the image) and one drawn image (a rectangle or line or text or oval or arc – anything that you draw).
Turn in your program and the composited image(s) via JES as "hw5". Your file must be named "hw5.py" and your function must be named "hw5" and accept a directory as input where the frames should be stored.
You must use more than one function in your solution. The main function will be "hw5" that takes input of a string that is a directory path. You must use at least one sub-function, so your file "hw5.py" will contain the function hw5() and at least one another.
Feel free to post your movies to Sp2003 HW5 Movies for sharing with others.
http://www.cnn.com is a popular news site. You are to write a function (named "hw6") that will input a directory as a string then:
Visit http://www.cnn.com and pick out the top three news stories headlines in the MORE NEWS section. (Hint: The anchors for the news story headlines all have <div class="cnnMainNewT2"> before them. Find that tag, then search for the beginning of the anchor <a, then you can find the anchor text, which is the headline.)
Create a ticker tape movie on the 640x480 canvas of all three news stories. Have one come across at y=100, another at y=200, and the third at y=300. Generate 100 frames, and don't have the ticker tapes move more than 5 pixels per frame. (In 100 frames, you won't make it all the way across the screen – that's fine.) Store the frames to files in the input directory.
You must use more than one function in your solution. The main function will be "hw6" that takes input of a string that is a directory path. You must use at least one sub-function.
Turn in your code as "hw6". Your filename should be "hw6.py"