Exam2Spr2009-3pm

Exam2Spr2009-3pm - CS 1315 Exam 2 Monday, 2 March 2009 3PM...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 1315 Exam 2 Monday, 2 March 2009 3PM Name: Signature: GT ID (its your 901/902): TA: INTEGRITY: By taking this exam, you pledge that this is your work and you have neither given nor received inappropriate help during the taking of this exam in compliance with the Academic Honor Code of Georgia Tech. Do NOT sign nor take this exam if you do not agree with the honor code. DEVICES: If your cell phone, pager, pda, beeper, iPod, or similar item goes off during the exam, you will lose 10 points off this exam. Turn all such devices off and put them away now. You cannot have them on the desk. ACADEMIC MISCONDUCT will not be tolerated. Your are to uphold the honor and in- tegrity bestow upon you by the Georgia Institute of Technology. Penalties for misconduct will be a zero on this exam, an F grade in the course, and/or other disciplinary action. Keep your eyes on your own paper. Do your best to prevent anyone else from seeing your work. Do not communicate with anyone other than a proctor for ANY reason in ANY language in ANY manner. Do not share ANYTHING during the exam. (This includes no sharing of pencils, paper, erasers). Do not use any paper that is not given to you by a proctor. Follow directions given by the proctor. Stop all writing when told to stop. Failure to stop writing this exam when told to do so is academic misconduct. Do not use notes, books, etc during the exam. Problem Points Possible Points Earned Points Lost Graded by page 2 20 page 3 20 page 4 20 page 5 20 page 6 20 TOTAL 100 page 2 of 6 1. (5 points) Given the code below, what does it do? Circle your answer. def mirror(source): mirrorpoint = int(getWidth(source) / 2) for y in range(1, getHeight(source)): for xOffset in range(1, mirrorpoint): p1 = getPixel(source, mirrorpoint + xOffset, y) p2 = getPixel(source, mirrorpoint - xOffset, y) color = getColor(p2) setColor(p1, color) (a) mirrors the image from the bottom to the top (b) mirrors the image from the top to the bottom (c) mirrors the image from the left to the right (d) mirrors the image from the right to the left 2. (5 points) Circle the one line of code in the following function that shows conclusively that the function is recursive....
View Full Document

Page1 / 6

Exam2Spr2009-3pm - CS 1315 Exam 2 Monday, 2 March 2009 3PM...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online