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

Fall 2005 Exam 1 Review - What Happen? Questions


It's green since the red and blue values become 0 and green is still 255...?

The blue pixel is the same as the red pixel....set at 300...right?

And what's the maximum value allowed for a color component of a pixel? -Student1680

i have no idea what is going on with this one...

the max. value is 255, but what does that have to do with the question??

Basically, we're asking what happens to a color value when you try to set it outside of the acceptable range? Does it max out the red? Does it throw an error? What Happen? -Student1680

it prints 44. 300-256=44. A color value can never be over 255.

setColor(p,white)
setRed(p,0)
setBlue(p,getRed(p))
the pixel is now(0,255,0)...green

are we supposed to assume that pic in getPixels(pic) is an already defined variable? or are we supposed to assume that pic has not been defined?

You can't pass white into set color unless white has already been defined for r,g,b. REMOVEDw does that last one work than?

REMOVED is predefined in JES. Type it. The word turns purple/bold. You can assume we won't ask you any trick questions where we'll give you something that'll generate an error because it isn't defined. -Student1680

getPixels(pic)
is an error, because we didn't define pic, right?

is it not green?

i am confused can you please explain what color the pixel is? green???? and how do you find it?
so when the pixel is set to white its values are 255,255,255. we then set the value of the red value to 0 so the new value for our pixel is 0,255,255. We then get the value of the red which is now zero and it is to the green value so the final value is 0,255,0. What color is that? -Student2081



Link to this Page