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, 23.06.2019 05:00
Acompany is inviting design for its new corporate logo from its users. this is an example of ? a. crowdfunding b. crowdvoting c. crowdsourced design d. crowdtracking
Answers: 3
question
Computers and Technology, 24.06.2019 00:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. obfuscate: to make something so confusing that it is difficult to understand.
Answers: 2
question
Computers and Technology, 24.06.2019 02:30
Assume a class window with accessor method getwidth that accepts no parameters and returns an integer. assume further an array of 3 window elements named winarr, has been declared and initialized. write a sequence of statements that prints out the width of the widest window in the array.
Answers: 2
question
Computers and Technology, 24.06.2019 07:20
Ingrid started speaking about her slide presentation. when she clicked to th"third slide, which had just a picture of an elephant, she forgot what she wassupposed to talk about. what could ingrid do to avoid this situation in thefuture? oa. print handouts for her audience.ob. add presenter's notes to each slide.oc. add a video to each slide.od. save her slide presentation to a flash drive
Answers: 2
You know the right answer?
Complete the function by filling in the missing parts. The color_translator function receives the na...
Questions
question
Chemistry, 27.07.2020 02:01
question
Mathematics, 27.07.2020 02:01
question
Mathematics, 27.07.2020 02:01
Questions on the website: 13722363