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...
The Citation Manager in Word can be used to create a bibliography
Indicate whether the statement is true or false
How is INSTEAD OF trigger different from BEFORE and AFTER triggers?
What will be an ideal response?