Each of the following is equivalent to the increase red functionProgram 35 (page 94). Test them and

Question:

Each of the following is equivalent to the increase red function—Program 35 (page 94). Test them and convince yourself that they work. Which do you prefer and why?

def increaseRed2 (picture): for p in getPixels(picture): setRed (p, getRed (p)*1.2) def increaseRed3 (picture): for p in getPixels(picture): getRed (p) getGreen (p) bluec = getBlue(p) newRed=int (redC*1.2) redC = greenC %3D newColor = makeColor(newRed,greenC, blueC) setColor(p, newColor)


Data from Problem 35

Increase the Red Component by 20%

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: