1 / 19

Where we’ve been…

Where we’ve been…. How many bits are required to store the number 256? a.      3 b.     8 c.      9 d.     10. In a balanced tree with 8 leaf nodes, how many steps will it take to reach a leaf? a. 1 b. 2 c. 3 d. 4. A URL specifies:

Download Presentation

Where we’ve been…

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Where we’ve been…

  2. How many bits are required to store the number 256? a.      3 b.     8 c.      9 d.     10

  3. In a balanced tree with 8 leaf nodes, how many steps will it take to reach a leaf? a. 1 b. 2 c. 3 d. 4

  4. A URL specifies: • The protocol to be used to download the web page • The domain name of the web server that contains the web page • The path of the web page on the web server • All of the above • Both (b) and (c)

  5. What does the following program compute? A = 0; B = 0; for R = firstRow to lastRow { For C = firstCol to lastCol { A = A + Sheet[R,C]; B = B+1; } } C = A/B; • Computes the sum of all the numbers in Sheet • Computes the average of all the numbers in Sheet • Computes the standard deviation of all the numbers in Sheet • Finds the maximum value of all the numbers in Sheet.

  6. Suppose you have a continuous tone image of a cat, and you would like to digitize it. Which of the following would tend to improve the quality of the resulting digital image? a. increasing the resolution b. decreasing the number of samples taken for each pixel c.      increasing the dynamic range d.     all of the above e.      a and b f.       b and c g.      a and c `

  7. Which of the images is generated by the following HTML file? <html> <script> inWord = "the"; theWord = "In"; begWord = "beginning"; alert(theWord+begWord); </script> </html>

  8. The following HTML file generates the example form. Suppose that the user was to click on the “Hello” check box (where the arrow is pointing). Which of the image choices below would be generated? <html> <script> function whenClicked() { document.aForm.msg.value="say "+ document.aForm.hello.checked; } </script> <h2>Try this</h2> <form name="aForm"> <input type="checkbox" name="hello">Hello <br><input type="checkbox" name="bye">Good-bye <br>Message <input type="text" name="msg"> </form> </html> Answer: Hello box becomes checked, nothing else happens

  9. How many arguments does the function have? function doSomethingElse(value, num) {      if (value < 5)      {           return num - 1;      }      else      {           return num + 1;      } } Answer: 2

  10. What is the value returned by the function? function doSomething(number, firstName, lastName) {      var message;      if (number == 1) {           message = "Hello";      }      else {           message = "Goodbye";      }      message = message + " " + firstName + " " + lastName;      alert(message); return message;} doSomething(1,"Fred","Flintstone") ? Answer: “Hello Fred Flintstone”

  11. Object representations of pictures are? a.     easy to create but difficult to edit b. more difficult to edit than pixel representations of pictures c.     easier to edit than pixel representations of pictures d. difficult to create and difficult to edit

  12. Which of the following picture types uses indexed color? a.      .gif b.     .jpeg c.      .png d.     .bmp

  13. Computer screens and televisions use an a.     additive color model b.     subtractive color model c.     hue, saturation and brightness model d.     none of the above

  14. Inkjet and other printers use a a.     additive color model b.     subtractive color model c.     hue, saturation and brightness model d.     none of the above

  15. Suppose you have an RGB color image, and for each pixel there are 256 possible values of red, 256 possible values of green, and 256 possible values of blue. How many bits are required to store the value of each pixel? a.     1 b.     3 c.     8 d.     24

  16. The following HTML script can generate the image below it. What will happen after the user clicks on “Hide” (where the arrow is pointing)? <html> <h2>Click tag</h2> <form name="aForm"> <input type="checkbox" name="say">It <br><input type="checkbox" name="say">Not It <br><input type="checkbox" name="do">Run <br><input type="checkbox" name="do">Safe <br><input type="checkbox" name="do" onClick="document.aForm.say[1].checked=true;">Hide </form> </html> Answer: Hide becomes unchecked, Not It becomes checked

  17. Suppose that you have an uncompressed 256x256 RGB color image in which each row of pixels is a different color (a total of 256 different colors). How many bytes would be required to store this image? • 512 • 65,536 • 131,072 • 196,608

  18. Now suppose that you compress the file from the previous question using run-length encoding. How many bytes would be required to store the compressed image? • 512 • 768 • 1024 • 1280

  19. This time take the (uncompressed) image and compress it using run-length encoding with indexed color. How many bytes would be required to store the compressed image? • 512 • 768 • 1024 • 1280

More Related