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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:30, DivineMemes420
What type of computer network ensures high security ?
Answers: 1
image
Computers and Technology, 23.06.2019 13:00, alexacarillo
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
image
Computers and Technology, 23.06.2019 22:20, tagerryawilson6
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
image
Computers and Technology, 24.06.2019 03:00, paguy12
What is one potential problem associated with an organization purchasing new technology early in its lifecycle
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 in other subjects:

Konu
History, 08.03.2021 19:30