Yellow Belt Promotion

If you received a Gold Star on Project 1, you have earned your Yellow Belt!

If not, here's what to do to get promoted.

Green Star

If you received a Green Star of Project 1, you can earn your yellow belt by solving the problem below. You can submit your answer by email (to evans@virginia.edu) with subject line Yellow Belt Problem. If your from address does not match your UVA ID, make sure to include your name and UVA ID in the email.

Problem Yellow: Define a function make_yellower that takes as input a color, and returns a color that is the average of the input color and YELLOW.

Your make_yellower function should behave like this:

>>> by = make_yellower(BLUE)
>>> get_red(by)
127.5
>>> get_green(by)
127.5
>>> wy = make_yellower(WHITE)
>>> get_red(wy), get_green(wy), get_blue(wy)
(255.0, 255.0, 127.5)
>>> wyy = make_yellower(wy)
>>> get_red(wyy), get_green(wyy), get_blue(wyy)
(255.0, 255.0, 63.75)

No Star

If you did not receive any star for Project 1, to advance to the Yellow Belt level you need to:

1. Complete Project 1. You may look at the solutions that were discussed in class, but should not copy them. You should write your own code, and not go back to the solutions once you start writing your code.

2. Solve the is_redder problem below:

Problem Redder: Define a function is_redder that takes two colors as inputs, and returns True if the first color is more red than the second color. (You may consider a color more red if its red component is higher than the other color, even if this doesn't match our perception well.)

You should get these interactions:

>>> is_redder(RED, BLACK)
True
>>> is_redder(BLACK, RED)
False
>>> is_redder(RED, PURPLE)
True

3. Solve the Problem Yellow above. (You can add this to your turnin.py file.)

Submit your completed turnin.py file by email.