Image-7 Exercises

< CS101


Write code to set a vertical stripe 100 pixels wide at the right edge of the flowers image to dark gray (red green blue all set to 100). The flowers image is 457 pixels wide.




Write code to set a horizontal stripe 20 pixels high along the bottom of the flowers image to light gray (200 200 200). The flowers image is 360 pixels high.




Write code to set the left half of the flowers image to be grayscale. (See the image-6 section for the definition of grayscale).



Each click of a Run button saves that code on the computer running the browser. The button below retrieves the all code exercises listed to the right of the button.

count 3 : image-7-ex1 image-7-ex2 image-7-ex3

(code appears here)