Write a function that treats horizontal thirds of the picture differently. Make the top third of an input picture brighter, then the middle third decrease blue and green by 30%, then the bottom third should be made negative.
What will be an ideal response?
```
def thirdsies(picture):
firstThird = (getHeight(picture)/3.0)
secondThird = (getHeight(picture)/3.0)*2
for p in getPixels(picture):
y= getY(p)
if y
setColor(p,makeLighter(c))
elif (y>firstThird) and (y
greenVal = getGreen(p)-getGreen(p)*0.3
setBlue(p,blueVal)
setGreen(p,greenVal)
elif y>secondThird:
redVal = 255-getRed(p)
greenVal = 255-getGreen(p)
blueVal = 255-getBlue(p)
setColor(p,makeColor(redVal,greenVal,blueVal))
```
Note: Use of the function makeLighter is not required for the left size of the image. One could also have increased the value of each pixel with new code.
You might also like to view...
____________________ code is simply the instructions defining how a program works.
Fill in the blank(s) with the appropriate word(s).
Cork is an example of a texture fill
Indicate whether the statement is true or false
One of C++'s advantages is that it provides the programmer access to the addresses of variables used in a program.
Answer the following statement true (T) or false (F)
When using an array of data with the FREQUENCY function, the following keystroke is required
A) Ctrl+Alt+Delete B) Ctrl+Shift+Enter C) Ctrl+Shift+Delete D) Ctrl+Enter