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:
- Darken
- Brighten
- GreyScale
- Posterize
- Solarize
Answer the following questions related to the hidden images and messages.
- After removing blue and green, what does noise.png look like?
- After multipling the red, What city were the first noisy
images from and what are these images? (noise.png and
iron-puzzle.png)
- Include your code for denoise.
- What is the image hidden in copper-puzzle.png? What city is it
from? What is the best multiplier in denoising this image?
- Include your code for denoise2
- Hidden message in clue.bmp and clue2.bmp?
- Include your code for denoise3
Part 3: Poker Odds
-
Run the program a few times and estimate what
percentage of five-card poker hands contain one pair.
- What is the probability of two pairs?
- Cut and paste your code for
is_two_pair
.
- What is the probabilty for three of a kind?
- Cut and paste your code for
is_threekind
- What is the probability for
is_fullhouse
?
- Cut and paste your code for
is_fullhouse
- Your estimate for flush and code for flush