subject

#this is 34 lines -- you can do it! # #In web development, it is common to represent a color like #this: # # rgb(red_val, green_val, blue_val) # #where red_val, green_val and blue_val would be substituted #with values from 0-255 telling the computer how much to #light up that portion of the pixel. For example: # # - rgb(255, 0, 0) would make a color red. # - rgb(255, 255, 0) would make yellow, because it is equal # parts red and green. # - rgb(0, 0, 0) would make black, the absence of all color. # - rgb(255, 255, 255) would make white, the presence of all # colors equally. # #Don't let the function-like syntax here confuse you: here, #these are just strings. The string "rgb(0, 255, 0)" #represents the color green. # #Write a function called "find_color" that accepts a single #argument expected to be a string as just described. Your #function should return a simplified version of the color #that is represented according to the following rules: # # If there is more red than any other color, return "red". # If there is more green than any other color, return "green". # If there is more blue than any other color, return "blue". # If there are equal parts red and green, return "yellow". # If there are equal parts red and blue, return "purple". # If there are equal parts green and blue, return "teal". # If there are equal parts red, green, and blue, return "gray". # (even though this might be white or black). #Write your function here!

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
Once the data center routes to the destination server that hosts the website, what's the next step in the internet process? user’s browser renders html code from destination server into web page request goes through router/model and isp request routed to nameserver and datacenter
Answers: 2
question
Computers and Technology, 23.06.2019 13:30
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
question
Computers and Technology, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
question
Computers and Technology, 24.06.2019 09:30
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
You know the right answer?
#this is 34 lines -- you can do it! # #In web development, it is common to represent a color like #t...
Questions
question
Engineering, 04.12.2020 18:50
question
Chemistry, 04.12.2020 18:50
question
Mathematics, 04.12.2020 18:50
question
Mathematics, 04.12.2020 18:50
Questions on the website: 13722362