Write a function to flip a picture over so that if someone was looking right, they end up looking left.
What will be an ideal response?
```
def flipPicture (src):
w = getWidth(src)
h = getHeight(src)
canvas = makeEmptyPicture(w,h)
for i in range(0, w):
for j in range(0,h):
p = getPixel(canvas, w-1-i, j)
p2 = getPixel(src, i, j)
color = getColor(p2)
setColor(p, color)
return canvas
```
Note: All you have to do is change the value you grab from if you were to just copy over the image. So the change is from what would be p = getPixel(canvas, x, j) to p =getPixel(canvas, w-1-i, j).
You might also like to view...
________ are declared in each individual HTML element using the keyword STYLE.
a) Cascading style sheets b) Inline styles c) External styles d) User style sheets
What is wrong with the following code?
``` class TVset { private: int screen; bool HiDef; public: TVset( ){}; int Getscreen(int scr); }; int main( ) { TVset myTV; return 0; } ``` A. Nothing is wrong with this code. B. the constructor does not initialize private values. C. there is a semi-colon after the class declaration. D. There are no set or get functions.
A ____ is a grid-like container with rows and columns.
A. portal B. form C. heading D. table
A watermark displays only on the first page of a two-page document.
Answer the following statement true (T) or false (F)