Comments for Week of Jan. 26, 2004
- How goes Homework #1?
- How went the Pre-Quiz and Quiz?
- Is this stuff making sense?
Comments, questions, complaints, rants, and raves?
Where can we download the pre-quiz for monday??
Good luck with that one. We picked them up in class on Friday.
Hmm... what if I was in court at the time of class?
Or out of court AND class?
Contact your TA–if you're nice maybe they'll help you out!
| You can get the pre-quiz from an instructor or TA, BUT YOU OUGHT TO BE TELLING US ABOUT MISSING CLASS BEFORE HAND. We are not required to give you the pre-quiz if you don't show up to class and don't tell us before the fact. The pre-quiz should be relatively simple, and we don't want you to spend lots of time on it. That's why the Friday-Monday pattern. Mark Guzdial |
The pre-quiz should be given to the class on Mondays. That way we have time to ask for help, during the week, from our TAs in our Breakout sessions.
| It is also possible to contact your TA over the weekend via email. A lot of TA's have also given their AIM screennames, which is a great way to contact them! If you have their phone number, you can also contact them this way. These are all ways to contact your TA outside of breakout sessions. This information can be found on the TA Contact Information website. Ashley Coker |
For the question I keep getting (via IM, phone, etc.):
>>> p = makePicture(pickAFile())
>>> pixel = getPixel(p,1,1)
>>> print pixel
Pixel, color=color r=168 g=131 b=105
>>> setGreen(pixel,-64)
>>> print pixel
Pixel, color=color r=168 g=192 b=105
>>> print 256 - 64
192
Please remember to bring a picture id (i.e. buzz card, driver's license) and a calculator to test sessions. You won't have to bring any ID to quiz sessions. Sorry for the confusion! Ashley Coker
Why do you subtract from 256 and not 255? I thought values could only go up to 255?
| because you have to include 0 as a value. So from 0 to 255, that is 256 values Ashley Coker |
You subtract from 256 because the values can go from 0-255 therefore leaving you with 256 possible values.
Yeah but if you get a negative value, the arithmetic done to get that negative value already took the zero into account. So shouldn't you subtract from 255? Michael Shaw
Let me give an example to justify what I said:
15-10=5 Take away 15,14,13,12,11,10,9,8,7,6...leaves 5
5-10=-5 Take away 5,4,3,2,1,0,-1,-2,-3,-4...leaves -5
Count the number of values that you took away; It's ten both times. Michael Shaw
I haven't found one TA with a AIM account. Anyone else found one? Maybe I didn't look long enough.
wow, how i ever missed that IM list is beyond me. Must have been something in the water that day.
would you rather have a pickAFile function in HW1? or just take a picture as an input through the command?
| it is required to NOT have pickAFile in hw1. You MUST take an input into the function. Ashley Coker |
Be sure that your first line of your homework looks like this: def hw1(picture): and your file should be named hw1.py. Your hw1 should work for ANY input picture, not one specific picture. Mark Guzdial |
When will the latest grades be posted on WebWork...Lab 2 and Quiz 1 to be specific.
Jonathan Shirlock
| We aim for one week turnaround. We're a bit behind due to a slow start, but hope to catch up through HW1 and HW2. Mark Guzdial |
For Lab 4, if we upload our webpage to PRISM, how do we let the TA know where it is? (since it won't be posted on the CoWeb)
| Woah! Lab 4??? Wow, you're WAY ahead of the game. You can email your TA and let him or her know, tell them in breakout session, and/or under the "Comments to TA" under the turnin in JES, just write "my webpage is posted to Prism instead of the Coweb". Ashley Coker |
| Also, you will probably want to type the link on your Who's Who page in the place of where people who have their webpages on the CoWeb will have their links. Summer McWilliams |
Whenever I click attach to post my picture from the homework into the poster gallery, a screen pops up to put in user name and password. When I put in my user name and password, the screen resets as if I put in the wrong password. How do I post my picture?
| If you're off campus when you do this, you will be prompted for a special password. See the FAQ page for details. Colin Potts |
Scaling down a picture: I wrote this program to scale down my picture:
def laurenSmaller():
laurenf=getMediaPath("LaurenFlower.jpg")
lauren=makePicture(laurenf)
canvasf=getMediaPath("7inX95in.jpg")
canvas=makePicture(canvasf)
sourceX=1
for targetX in range(1,500):
sourceY=1
for targetY in range(1,390):
color=getColor(getPixel(laurenf,sourceX,sourceY))
setColor(getPixel(canvas,targetX,targetY), color)
sourceY=sourceY+2
sourceX=sourceX+2
show(lauren)
show(canvas)
return canvas
And it will not run - I get an error on the color= line. Any idea why? Thanks! Oh - the spacing is there, too - when you click on "edit" on this page you can see it.
As a matter of fact - I am getting errors on the color= line with almost all the programs from page 84 and on.
| Put <html><pre> at the beginning of your code and </pre></html> at the end of your code. Check out the FAQ. And what is the exact error you're getting Houman Khalili |
| My bet is that your error was about "index out of bounds" – yes? That's a very common error when doing these kinds of programs. Are your sure that 390 and 500 are WITHIN the range of the picture? In Breakout this week, we'll be talking about how to trace and debug these kinds of programs. Mark Guzdial |
Yeah, they're amazing...until you find out that someone changed your picture!! I had a nice one of the Grand Canyon and I went to show a friend, and instead there was a picture of Barbara. Oh, and the girl before me had a different picture, too. Who changed the page???
| If someone uses the SAME FILE NAME as you, then their upload trumps yours. (It's actually still there – go to the Attach view and see the past "versions." Click on the "R.") Rename your picture and re-upload it. Mark Guzdial |
Link to this Page