![]() ![]() |
| |||||||||
| Hotspots: Slides and Code TA Corner Comments? Announcements FAQ Static Webspace | ||||||||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| No, don't do anything with WAV files at all. Midterm #2 will be graded April 1 (so that there's time for those taking make-ups to take it, like those at the NCAA tournament.) Mark Guzdial |
| Yes. Each of the four links (original, red, green, and blue) should take you to a different picture. You can read the example HTML to see how that's supposed to work. Mark Guzdial |
| We should be able to run the JES file to generate the HTML file for ourselves, so no, you don't need to turn in the HTML file. Mark Guzdial |
| Yes, Lauren, that's how the links should work – all links are to original-sized images. The pictures should go across, not down the page. Mark Guzdial |
| You-il, read the assignment again. We state REALLY CLEARLY that you are NOT shrinking any pictures here! You should not be scaling any pictures. Mark Guzdial |
| I don't really care about the spacing, but it is really easy to insert a single space between them. Mark Guzdial |
| The error message is at fault (we need to fix it) – your directory is badly formed. Mark Guzdial |
| FYI: I won't be around this weekend (driving my family down to Florida for their Spring Break). The other instructors and TA's will be answering questions here this weekend. Mark Guzdial |
| That's a specific question about your program that I can't answer, Lauren, but if you look on the HW4 page, you may find the solution. Mark Guzdial |
| Yes. Mark Guzdial |
| This means that you are NOT RESIZING the images like you did in homework 4. What you are doing instead is using html to resize the pictures for you. Visit this site and pay attention to the area where it talks about optional tags. Larry Olson |
| Yes. Mark Guzdial |
| Yes, I agree, more than one def would likely be useful and you can refer to HW 4 for options on doing that Larry Olson |
| Yes, but you could always try it to see. (It was in the HTML slides.) Mark Guzdial |
| I don't understand the question, but I suspect that reading the assignment will answer it. Mark Guzdial |
| You are NOT making pictures 100 pixels high! You are NOT copying anything into any canvas! Mark Guzdial |
| I can't answer that, Melissa. Re-read the assignment. Mark Guzdial |
| Chapter 3 explains how to set pixel values and how to save pictures.Chapter 9 is on HTML. Mark Guzdial |
| When we're done–it's always hard to predict how long it will take. Mark Guzdial |
| The program should work for ANY directory with ANY number of JPEG pictures in it. Mark Guzdial |
| You can always use printNow (p. 269) to get it to tell you where you're at in the program. Mark Guzdial |
| We can't help you with your program, Amelia. I will say that, if you don't have any loops, your program can't be right. I will also suggest that you test your program with only a few small pictures in your directory. Mark Guzdial |
| Running time is dependent on the size of the pictures you have as input to the function and on how you coded the answer Larry Olson |
| I don't know, Paula. That's a question about your program, and I can't address it. Mark Guzdial |
| A good way to figure it out might be to read the HTML file at the bottom. You know what Anchor and Image tags do. You should be able to figure out from there what links to what. Mark Guzdial |
| Nope – we don't care about reading the HTML file. Mark Guzdial |
| No, you'll just have to read your code carefully and consider the debuggig suggestions we've made in class and in the text. Mark Guzdial |
| I think that writePictureTo is the only way that you have to create pictures. Mark Guzdial |
| Same size as the original picture. Mark Guzdial |
| You should not be creating any smaller pictures. At all. The links all go to original size pictures. Mark Guzdial |
| Karin, read the HTML page at the bottom of the page again to see how we generated the HTML. Mark Guzdial |
| You might look at the collage example in the book to see how subfunctions are positioned. Mark Guzdial |
| If your input is not a picture, that has NOTHING to do with HTML. Mark Guzdial |
| President Clough has asked all faculty to consider the NCAA Tournament in scheduling examinations. Based on his request, Take Home Exam #2 is now due Wednesday April 7 at noon. Mark Guzdial |
| I'm not really concerned about the title, but it should not reference a directory on my disk. Mark Guzdial |
| I can talk about things in the book. Consider page 61, the function for clearing blue from a picture. |
def clearBlue(picture):
for p in getPixels(picture):
setBlue(p,0)
| Based on that, I think it's pretty easy to see how (for example) to clear both the blue and the green, in order to get the all red version of the picture. Given what you did in HW4, I think you can figure out how to (a) make a picture that's in a directory, (b) clear the blue and green, (c) save out the new picture as "red_" + the filename. Mark Guzdial |
| Read one inch higher in the page. Mark Guzdial |
| To figure out where syntax errors are coming from, a great thing to do is print out your code, and look for parentheses and quotes. I bet that you have a problem with the same number of opening and closing parentheses and/or the same number of quotes. It gets confusing, especially with the quotes, so go back and check those. You're getting this error when you try to load the program, right? (just want to make sure we're talking about the same thing). Ashley Coker |
| Depends on how you set up your program. Ashley Coker |
| Not sure i understand what you're asking. Ashley Coker |
| I think any order is fine. Ashley Coker |
| Sorry, can't answer, Sabrina. Mark Guzdial |
| I can't answer questions about your program, Catherine. Sorry! Mark Guzdial |
| No, please don't post any of your program code. Mark Guzdial |
| No, no style points. Interesting idea, though! :-) Mark Guzdial |
| Rizwan, I'm not sure what you're asking, but I will assure you that your code MUST generate the height tags. They won't appear in the file unless your program creates them. Mark Guzdial |
| The 100 height images link to the full-size images. See the HTML example. Mark Guzdial |
| You're about to submit a functioning Take Home Exam 2 and you "will never understand this stuff"? Could you have written this program before you started on this class? I think you underestimate your (considerable!) talents at learning new things! Mark Guzdial |
| If you didn't have "Filename:" and the actual filename, you probably wouldn't lose points, but how hard is it to add it and get it right? I can't help you with your program, I'm sorry, but I can observe that "/n" is amazingly similar to "\n" which Python uses to stand for "New line." Really quite similar. Mark Guzdial |
| We can't answer questions about your program. Sorry. Mark Guzdial |
| Write in on a piece of paper, sign it, and give it to your TA or your instructor. Mark Guzdial |
| First link goes to normal, and the other three go to Blue, Green, and Red. Mark Guzdial |
| Are you sure it ran? You might want to use printNow() to make sure. Mark Guzdial |
| You can access functions before they're defined, if they're all in the same file. It works fine – look at the collage example in the book. Mark Guzdial |