Code help regarding python

Can anyone help for this code? Thank you

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.

def color_translator(color):
if color == “red”:
hex_color = “#ff0000
elif ___ == “green”:
hex_color = “#00ff00
elif ___ == “blue”:
hex_color = “#0000ff
hex_color = “unknown”
return ___
print(color_translator(“blue”)) # Should be #0000ff
print(color_translator(“yellow”)) # Should be
print(color_translator(“red”)) # Should be #ff0000
print(color_translator(“black”)) # Should be
print(color_translator(“green”)) # Should be
print(color_translator("")) # Should be unknown

RuntimeErrorElement(RuntimeError,Error on line 2:
if color == “red”:
IndentationError: expected an indented block
0 / 1 point


IndentationError occurs when you mess up some whitespace areas.

Remember that after ‘:’ we should start the new line with four spaces or one TAB

def color_translator(color):
    if color == 'red':
        hex_color = '#ff0000'

Hope this helped)