Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm Exam 1 Review Spring 2004: Match the meaning to the program

(Return to Sp2004 Midterm 1 Review)

Questions, answers, comments on answers, comments on questions?



Amelia Cipolla
Is there an error in the multiple choice? Both 4 and 5 say input pic from left to right. I got that D. is right to left. Also, on C., what does "Tracing the printing" mean???

Surely you jest? Errors? Actually, they both look like cut and paste errors. Colin Potts

I fixed the options – one now says right-to-left. Thanks, Amelia! Mark Guzdial


A-2
B-3
C-5
D-4
E-1
Correct?


I got the same answers as above. Hope that means they're right!!!
:-)

Kelli Webb




Kelli, which did you have that said "from right to left?" 4 or 5? Thanks!
Marggee Godbee

I got the same answers as others. Why does C have "Tracing the printing" on line 2? Will this cause an error?
Clarke Collins

That's an mistake. My guess is it was part of a comment line that wasn't deleted properly. Yes, it would cause an error. Colin Potts

I got what everyone wlse did. I hope it's like this on the midterm! :)

I don't understand why A is 2 and B is 3.

In B:
p = getPixel(source,mirrorpoint-x,y) means JES is getting the pixel from the left.
p2 = getPixel(source,mirrorpoint+x,y) means JES is getting the pixel from the right.
SO, setColor(p,getColor(p2)) is setting the color of the pixel on the right to the pixel on the left.

In A:
setColor(p2,getColor(p)) sets the color of the pixel on the left to that on the right.

Hope that answered your question.

Nicely said, Annapurna! Mark Guzdial



Link to this Page