Solution 1

``````def color_mixer(color1, color2):
if color1 == 'blue':
if color2 == 'red':
return 'Magenta'
elif color2 == 'yellow':
return 'Green'
elif color1 == 'red':
if color2 == 'yellow':
return 'Orange'
elif color2 == 'blue':
return 'Magenta'
elif color1 == 'yellow':
if color2 == 'blue':
return 'Green'
elif color2 == 'red':
return 'Orange'
``````

# Color mixer

Define a function `color_mixer` that receives two colors `color1` and `color2`
and returns the color resulting from mixing them in EITHER ORDER.
The colors received are either `red`, `blue`, or `yellow` and you should return:

`Magenta` if the colors mixed are `red` and `blue`

`Green` if the colors mixed are `blue` and `yellow`

`Orange` if the colors mixed are `yellow` and `red`

Examples:

``````>>> color_mixer('red', 'blue')
'Magenta'
>>> color_mixer('blue', 'red')
'Magenta'
>>> color_mixer('blue', 'yellow')
'Green'
>>> color_mixer('yellow', 'red')
'Orange'
``````

### Test Cases

test yellow blue -

``````def test_yellow_blue():
assert color_mixer('yellow', 'blue') == 'Green'
``````

test red yellow -

``````def test_red_yellow():
assert color_mixer('red', 'yellow') == 'Orange'
``````

test blue yellow -

``````def test_blue_yellow():
assert color_mixer('blue', 'yellow') == 'Green'
``````

test yellow red -

``````def test_yellow_red():
assert color_mixer('yellow', 'red') == 'Orange'
``````

test red blue -

``````def test_red_blue():
assert color_mixer('red', 'blue') == 'Magenta'
``````

test blue red -

``````def test_blue_red():
assert color_mixer('blue', 'red') == 'Magenta'
``````
def color_mixer(color1, color2): pass