Rewrite Program 52 (page 124) to use an if with an else. Data from Program 52 def

Question:

Rewrite Program 52 (page 124) to use an if with an else.


Data from Program 52

def posterize(picture): #loop through the pixels for p in getPixels (picture): #get the RGB values red = getRed (p) green = getGreen (p) blue = getBlue (p) %3D %3! #check and set red values if(red < 64): setRed (p, 31) if(red > 63 and red < 128): setRed (p, 95)

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

Step by Step Answer:

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