![]() ![]() |
| |||||||||
| Hotspots: Slides and Code TA Corner Comments? Announcements FAQ Static Webspace | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Monday, Oct. 4, 2004 @ 7 PM EST Angela Liang |
| If you notice, the picture that you are to download and manipulate is not just the image. It includes a lot of white space surrounding the image. Kelly Lyons |
| You only need to turn in your program. Kelly Lyons |
| We do not grade pixel by pixel, we grade your code. If you write the code to do what we have asked you to do, then you will get a good grade. If your code does other things, but the result happens to look similar, you will not get a good grade. But, it will be really hard to make your file look the same without doing it correctly. Just follow the instructions on how to change the picture, and you should be ok. Kelly Lyons |
Think about what range(0, to something) generates and think about what kind of input pixel-related things in JES are expecting. -Blake O'Hare |
| When you save it, can you find it on your hard drive? Is it a jpg file? Are you using the right variable name when trying to show it? Does your function return the picture? If so, are you saving the returned picture, and what are you calling it? These are some thoughts that might help you solve your problem. Kelly Lyons |
| The due date is stated in the syllabus and lecture slides page. It is due on Monday at 7 PM. Kelly Lyons |
| that should be fine. Lauren Walker |
| I'm not sure if there are any slides on it, but try making your inner for loop dependant on the other variable, for example: for y in range(1,x) Try something like this in JES and see what it does. This should help you figure out how to mirror diagonally. Kelly Lyons |
| If you notice, the picture you download includes not only the image, but a lot of white space surrounding it. This is the whole canvas that you will need. Kelly Lyons |
| Yep, please remember to type it in though everyone, because we really will not grade your take home without it!! Summer McWilliams |
| I believe this falls under what we cannot discuss. There are however some ideas on how to solve out of bounds errors on the HW2 questions page. You might want to look there for help. Kelly Lyons |
| The image that results after the mirroring Kelly Lyons |
| We're not going to hung up over how much of a gap there is. Mark Guzdial |
| It should take no longer than your HW2 function did. Kelly Lyons |
| Why don't you download the resultant image, and open it in your picture tools, and compare the pixels in it to the pixels in your resultant image. Kelly Lyons |
| If you have a function that returns something and you don't save it when you run the function, it prints it to the command area. Kelly Lyons |
| How did you negate (or make other changes to) specific pictures in you collage? Summer McWilliams |
| Why don't you try it and see. Remember that once you enter a new function, any contraints you set outside of the function may be ignored. Kelly Lyons |
| A few minutes of time is allowable. If it takes more than 10 minutes, then it would be less OK. Kelly Lyons |
| It really depends on the speed of your computer – if you have an older computer, then it may take longer. The TAs have access to zippy, newer computers. On the other hand, if it's REALLY slow (like Kelly says, 10 minutes), then you may have a bug in your program. Mark Guzdial |
| Dear U. "open a separate picture if it's not a canvas?" I'm not sure what that means. I'll try saying it a different way: You will make only one picture in your function for take home exam 1– the one you download from the Take-Home Exams-Fall 2004 page. That's it. Period. (Hint: You make two pictures, it's probably wrong.) (Second hint: Don't even consider making three pictures.) Mark Guzdial |
| More than 10 minutes is probably going to be too long. 35 min def. too long. But, if your code works then that's all that matters. Amanda Bennett |
| Trace through your program with a peice of paper. Walk through it and make sure it does what it's supposed to do. If that doesn't work, you can put some print lines in your code to see when your code works and what part it gets stuck on. Amanda Bennett |
| Thread death is what you get when you click the Stop button. I supposed that it could also happen if you have something take up all of memory. Folks, I can't help you with your individual programs, but I can offer a mini-lecture here that might help – call it a foreshadowing of a future lecture, on why things take forever to run. Take a look at page 317 in the book. Indentation MATTERS. If you indent things and get it wrong (e.g., keep indenting and never out-denting), then your FOR loops are running inside of one another and the code DOES take forever to run – or it might run out of memory. The lesson of page 317 is that FOR loops multiply the amount of time it takes to do something. Now, take a look at the program at the bottom of page 88. What if the show(source) were indented to line up with the count=count+1? Then we'd show the picture once for each time that we copied a pixel color...18,340 times! That's a lot of show's! What if you get your indentation wrong in your collage code? Then maybe you negate a picture once for EACH pixel copy. That sounds like a lot of extra negating to me. Betcha it would take a lot of time, too! Mark Guzdial |
| The function should be called exam1 and saved as exam1.py. We will have the image so you do not have to worry about turning it in with your program. Lauren Walker |