solutions

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 - Run Test

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

test red yellow - Run Test

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

test blue yellow - Run Test

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

test yellow red - Run Test

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

test red blue - Run Test

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

test blue red - Run Test

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