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 01:40
When the pc version of the spreadsheet program became available, the ibm pc quickly became the top-selling personal computer?
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
question
Computers and Technology, 23.06.2019 16:30
How to do this programming flowchart?
Answers: 3
question
Computers and Technology, 24.06.2019 14:00
Which describes careers that have similar education requirements but different qualifications? product safety engineers and materials engineers industrial safety engineers and industrial health engineers quality control systems managers and inspectors industrial safety and health engineers and hand packers
Answers: 3
You know the right answer?
Complete the function by filling in the missing parts. The color_translator function receives the na...
Questions
question
Mathematics, 08.02.2021 07:30
question
Mathematics, 08.02.2021 07:30
question
Mathematics, 08.02.2021 07:30
question
Mathematics, 08.02.2021 07:30
Questions on the website: 13722367