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

This page removed for FERPA compliance
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Final Exam Review Spring 2003: Movie Variations

Questions, answers, comments?

(Back to Sp2003 Final Exam Review)



(a) Creates a red rectangle with a position x-coordinate 10 times the value of the frame number and y-coordinate 5 times the value of the frame number. Its size also increases with the frames.
The length of the rectangle is the same as the numerical value of the frame number, and the width is two times the frame number.
Therefore, the length will be 99 at greatest and the width will be 992 at its greatest, 198.

(b)This rectangle moves the same as the one in function (a) but does not increase in size.

(c)Moves the same as (a) and (b) but increases in size at a different rate than (a) does.
It increases at length times 2 and width times 3.
Chris REMOVEDng: 




If I asked you to draw a picture of, say, the 1st and 50th frame for each, could you? Mark Guzdial


would such a question not be ambigious? I could draw anything not to scale, and it won't be answering the question. At the end of the day there'll be various arguments again about drawings be right. Or do you mean we should draw them(lines) in codes?

If you have to draw two frames, especially the first and halfway through, then the differences between the frames should tell us if you understand what was changing. Mark Guzdial


for the answer C that chris gave, im a little confused. if its a moving line, how can it have a width???

doesn't b also change the shade of grey of the rectangle? it says ...makeColor(frame,frame,frame)...
Katie REMOVED: 


its not a line for C, it's a rectangle just like in the first two

In questin "a", isn't it 10pixels(x position), 5pixel(y position) times the value of the frame number or just 10, 5 times? I'm trying to get the language together. I believe the frame moves 10pixels in x position or 5pixel in y position times the frame value. isn't it?

Yes, Katie – good call! Use ☆ for multiplication to get it to show up in the CoWeb. Mark Guzdial

Actually the third program does produce a line rather than a rectangle (whose length increases by 2 times the frame number and 3 times the frame number for the x and y positions of the end of the line). Try running the program and you'll see what I mean.
REMOVEDmmer McREMOVED: 


I'm really scared about the whole drawing of each frame. Also, what if, as in b, the color is changing differently from the others? We can't draw the color. We can tell you. Would that work? Would you be too upset if our drawings were really imperfect. I can't draw to save my life.

I'll bet that I draw worse than you :-) No, we wouldn't take off for not being able to draw. Mark Guzdial


Link to this Page