Solutions will be available when this assignment is resolved, or after a few failing attempts.

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


>>> color_mixer('red', 'blue')
>>> color_mixer('blue', 'red')
>>> color_mixer('blue', 'yellow')
>>> color_mixer('yellow', 'red')

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'
def color_mixer(color1, color2): pass