subject

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:00
What is a distinguishing feature of today’s graphic application software?) graphic applications are used today on a variety of devices, including touch-screen kiosks and mobile phones.
Answers: 3
question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
Companies that implement and apply an information system effectively can create
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
You know the right answer?
Complete the function by filling in the missing parts. The color_translator function receives the na...
Questions
question
Mathematics, 25.10.2019 21:43
question
Mathematics, 25.10.2019 21:43
question
Biology, 25.10.2019 21:43
Questions on the website: 13722359