Write a function to swap the values of two colors, for example, swap the red value with the blue value.
What will be an ideal response?
```
def swapRedBlue(picture):
for pix in getPixels(picture):
valueBlue=getBlue(pix)
valueRed=getRed(pix)
setRed(pix,valueBlue)
setBlue(pix,valueRed)
```
Note: You could pick any swap combination of the three colors (red, green, or blue). The only change would be in which “get” and which “set” methods were used.
OR
```
def swapRedBlue(picture):
for pix in getPixels(picture):
valueBlue=getBlue(pix)
valueRed=getRed(pix)
valueGreen=getGreen(pix)
setColor(pix,makeColor(valueBlue,valueGreen,valueRed))
```
You might also like to view...
When different styles are used in the same document, you should display the Styles pane by clicking:
A) Show Styles in the Paragraph group on the Page Layout tab. B) Show Styles in the Paragraph group on the Home tab. C) the Dialog Box Launcher in the Styles group on the Home tab. D) the Dialog Box Launcher in the Styles group on the Page Layout tab.
The ________ of the Windows 8 interface were inspired by metropolitan service signs found on bus stations and subways
Fill in the blank(s) with correct word
Data is sent as bits at what layer of the OSI model?
A. Transport B. Network C. Data Link D. Physical
The Slide ____________________ is the main slide that stores information about the theme and slide layouts of a presentation.
Fill in the blank(s) with the appropriate word(s).