Complete the function by filling in the missing parts. The color_translator function receives the name of a color, then prints its hexadecimal value. Currently, it only supports the three additive primary colors (red, green, blue), so it returns "unknown" for all other colors. m 1 - def color_translator(color): 2. if _== "red": 3 hex_color = "#ff0000" 4- elif == "green": 5 hex_color = "#00ff00" elif == "blue": hex_color = "#0000ff" in 0 hex_color = "unknown" return _ . 12 13 14 15 16 17 print(color_translator("blue")) # Should be #0000ff print(color_translator ("yellow")) # should be unknown print(color_translator("red")) # Should be #ff0000 print(color_translator ("black")) # should be unknown print(color_translator("green")) # Should be #00ff00 print(color translator("")) # should be unknown Run Reset

Solved
Show answers

Ask an AI advisor a question