Write a function to make lighter the left side of a picture, and turn the right side into a grayscale.
What will be an ideal response?
```
def halfsies(picture):
center = getWidth(picture)/2
for p in getPixels(picture):
x= getX(p)
if x
setColor(p,makeLighter(c))
elif x>center:
intensity = (getRed(p)+getGreen(p)+getBlue(p))/3
setColor(p,makeColor(intensity,intensity,intensity))
```
Note: Use of the function makeLighter is not required for the left size of the image, but is implied in the wording. One could also have increased the value of each pixel with new code.
You might also like to view...
What are the differences between an ordered list, an unordered list, and an indexed list?
What will be an ideal response?
To add a link to another website to your tweet, simply type the ________ as part of your message
Fill in the blank(s) with correct word
Match the following terms to their meanings:
I. clip art II. borders III. shading IV. lists V. styles A. background of an element B. used to organize information by emphasizing important points C. predefined set of formatting options to apply to characters or paragraphs D. can be used to prevent using so much text to bore the reader E. line or series of small graphics that could surround a paragraph or a page
If you reduce the size of an image using the Resample tool, can you restore the
image to its original size later? What will be an ideal response?