Compsci 101, Fall 2014, Lab 8

Part 1: Enumerate

Write your code that includes a list comprehension instead of enumerate.

Part 2: Image Processing

Put in your code for the following methods:

  1. Darken
  2. Brighten
  3. GreyScale
  4. Posterize
  5. Solarize

Answer the following questions related to the hidden images and messages.

  1. After removing blue and green, what does noise.png look like?

  2. After multipling the red, What city were the first noisy images from and what are these images? (noise.png and iron-puzzle.png)

  3. Include your code for denoise.

  4. What is the image hidden in copper-puzzle.png? What city is it from? What is the best multiplier in denoising this image?

  5. Include your code for denoise2

  6. Hidden message in clue.bmp and clue2.bmp?

  7. Include your code for denoise3

Part 3: Poker Odds

  1. Run the program a few times and estimate what percentage of five-card poker hands contain one pair.

  2. What is the probability of two pairs?

  3. Cut and paste your code for is_two_pair.

  4. What is the probabilty for three of a kind?

  5. Cut and paste your code for is_threekind

  6. What is the probability for is_fullhouse?

  7. Cut and paste your code for is_fullhouse

  8. Your estimate for flush and code for flush