Image-7 Exercises

< CS101

1.

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.


image-7-ex1

 

2.

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.


image-7-ex2

 

3.

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


image-7-ex3

 


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)