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 PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Test 2 Review Questions- Fall 2007

Please post questions here. As with the last review, we won't point out correct answers, but we will try to point out incorrect answers. If you would like in depth help, please meet with a TA.


For movie coding, my answer is as follows: Alex Young
Removed. I'll respond personally, but please don't post the entire answer (just e-mail a TA if you don't think yours is right). Thanks! Brittany Duncan
For tracing, I got DAE. Alex Young

I still don't feel like I understand what it is we're going to be tested on...
Everything you have covered since the last test, especially Chapter 12. Thanks! Brittany Duncan
so will this test be more closely related to the practice test than last time?
who makes the test?
Dr. Potts and I make the test. Thanks! Brittany Duncan
for the last practice test- i completed it and did horribly on the test, will this test be more like the practice test?
what from the last test will be on this test?
With the exception of the final, which is cumulative, each test will concentrate on material that has been covered in class since the previous test. This is not a secret. I have announced this in class and on the CoWeb. For Test 2, this means the emphasis will be on picture blending + graphics (Chapter 5) and movies (Chapter 12). Material in those chapters that are not asked about in the test review could come up in the test. Colin Potts
okay so, i'm trying to some functions from the book, and i don't know how to get them to work:

def movingRectangle(directory):
  for frame in range(1,100):
    canvas = makePicture(getMediaPath("640x480.jpg"))
  if frane < 50: #Less than 50, move down
    # Generate new postions each frame number
    addRectFilled(canvas,frame*10,frame*5,50,50,red)
  if frame >= 50: #Greater than 50, move up
    addRectFilled(canvas,(50-(frame-50))*10,(50-(frame-50))*5,50,50,red)
  framenum=str(frame)
  if frame < 10:
    writePictureTo(canvas,directory+"//frame0"+framenum+".jpg")
  if frame >= 10:
    writePictureTo(canvas,dircetory+"//frame"+framenum+".jpg")


so, what do i put in the command area to get it to run?
If you surround your code with code tags, someone will answer your question. But only then. Colin Potts
You misspelled directory in last line of your code. Fix that first.
you also misspelled frame in the 4th line
I'm not sure what your real question is. You type movingRectangle("blah") where "blah" is replaced by whatever directory you want to write the frames into. But, presumably you know how to call a function by now! Colin Potts
BTW, the textbook was written before there was a makeEmptyPicture function. It would be better to use that in line 3. And, if you are trying to understand graphics, why not replace the final five lines with a call to writeFrame, as demonstrated in class? That way you wouldn't have to worry about path syntax and wouldn't need to pass a directory in. Colin Potts

what practice test is the person above referring to and where can we find it?
You're there now. Colin Potts
i hope this test doesnt trick us like last time. . . .
if the test arent cumulative except for the final then why did one of the TA's say "the last test is fair game for this test"- she made it seem as if its cumulative. . . can you make sure that this test isn't cumulative, thanks:-)
will the writeFrame function always be the same


won't it be inherently cumulative since this chapter builds off of what we learned in the first test?

Link to this Page