Welcome to CS1315. Click on the python to add comments.
This page removed for FERPA compliance
Take-Home Exams-Fall 2003
Take Home Exam #2:
Given a folder with images and sounds in it, create an index HTML page with links to each image and sound.
You will write a function called indexREMOVED that takes a string which is the path to a directory. You will create a page in that directory named index.html. Index.html should be an HTML page containing a link to every JPEG file and every WAV in the directory. At the top of the page, put a heading (level 1) with the phrase "Directory listing of sounds and images in " and then the directory, e.g., "Directory listing of sounds and images in C:\Documents and Settings\Mark Guzdial\mediasources"
The links should be each a row in a table (<table>...</table>). The first item in the table should be a link to the filename. The anchor text in each link should be the filename of the image or sound. The destination (href) should be the file itself (the same filename). The second item (column) in the two should be information about the file.
For each image, list the horizontal and vertical size (in pixels) of the image.
For each sound, list the length of the sound in seconds.
For example, your listing might say:
Filename: barbara.jpg
height 240 pixels, width 120 pixels
Filename: hello.wav
length 4.2 seconds
Clicking on "barbara.jpg" above should display that file. Clicking on "hello.wav" should go to that sound (as the destination of the link)–and if your browser and sound card as set up appropriately, you should hear the sound.
Turn in your program via JES as "exam2". Your filename should be "exam2.py" Your function name should be indexREMOVED The exam is due by 5 pm on the due date.
This is a NON-COLLABORATIVE ACTIVITY! You may not talk to anyone about their code, nor look at anyone else's code, nor allow anyone to see your code. This is a TAKE HOME EXAM. It is an "open book" exam. You may use your book, any slides, any material in the CoWeb, and any programs you've written (even with others) that you already have direct access to.
Ask questions on Fall 2003 Take Home Exam 2 Questions but be sure to ask questions only about objectives and process. You are welcome to ask questions about any of the programs in the book or in the slides, but you cannot ask anyone (even the TA's or teacher) about your own solution.
When you turn in your exam, you are to enter into the Comment area the statement: "I did not provide nor receive any aid on this exam." IF YOU CANNOT MAKE THAT STATEMENT TRUTHFULLY, DO NOT SUBMIT YOUR EXAM! ANY EXAM WITHOUT THAT STATEMENT WILL NOT BE GRADED.
Take Home Exam #1:
Write a function called exam1 in the file exam1.py which:
Takes the picture myfigure.jpg from your media path (Note: You'll have to set it first from the Command Area!) and copies it to the upper left of the 640x480.jpg canvas. Here's myfigure.jpg: (You'll need to download this picture and store it in your media directory. Right click on this picture, choose "Save As," then save it in your media directory.)
Create a negative of myfigure.jpg and copy it just to the right of the first copy on the canvas.
Then mirror the two copies of myfigure.jpg top-to-bottom. The two rows should be very close, even touching. There should be no REMOVED than 5 pixels of whitespace between the first and second rows.
Show the resultant canvas.
The result should look like this:
This is a NON-COLLABORATIVE ACTIVITY! You may not talk to anyone about their code, nor look at anyone else's code, nor allow anyone to see your code. This is a TAKE HOME EXAM. It is an "open book" exam. You may use your book, any slides, any material in the CoWeb, and any programs you've written (even with others). (I'll bet Homework 2 would be useful for this one...)
Ask questions on Student815 but be sure to ask questions only about objectives and process. You are welcome to ask questions about any of the programs in the book or in the slides, or any of the topics in the class (e.g., "I don't understand mirroring – can you help me go through it again?") but you cannot ask anyone (even the TA's or teacher) about your own solution. DO NOT POST ANY OF YOUR CODE ONTO THIS PAGE IN ASKING QUESTIONS!
Turn in your program via JES as "exam1". When you turn in your exam, you are to enter into the Comment area the statement: "I did not provide nor receive any aid on this exam." IF YOU CANNOT MAKE THAT STATEMENT TRUTHFULLY, DO NOT SUBMIT YOUR EXAM! ANY EXAM WITHOUT THAT STATEMENT WILL NOT BE GRADED.
Links to this Page
Past Semesters last edited on 20 December 2011 at 4:36 pm by c-66-56-29-29.hsd1.ga.comcast.net