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, 21.06.2019 17:00
In addition to using the icons to adjust page margins, a user can also use
Answers: 1
question
Computers and Technology, 22.06.2019 12:20
Usually, when we sniff packets, we are only interested certain types of packets. we can do that by setting filters in sniffing. scapy’s filter use the bpf (berkeley packet filter) syntax; you can find the bpf manual from the internet. set the following filters and demonstrate your sniffer program again (each filter should be set separately): (a) capture only the icmp packet. (b) capture any tcp packet that comes from a particular ip and with a destination port number 23. (c) capture packets comes from or to go to a particular subnet. you can pick any subnet, such as 128.230.0.0/16; you should not pick the subnet that your vm is attached to.
Answers: 3
question
Computers and Technology, 22.06.2019 17:20
[a] create a class called “cycle” which has two instance integer variables as properties, “numberofwheels” and “weight.” create a constructor with two parameters, using the same variable names in the parameter list. assign each variable to numberofwheels” and “weight” respectively. write a separate application to test the class and display its properties. note: do not change the names of the instance variables or the variables listed in the constructor’s parameter list. [b] edit your class cycle by adding a default constructor which will assign the default values of 100 to represent the numberofwheels, and 1000 to represent the weight, by invoking a call to the other constructor. modify your application created in [a] to test the class.
Answers: 3
question
Computers and Technology, 22.06.2019 19:20
How might the success of your campaign be affected if you haven’t carefully completed all field data or if you accidentally insert the wrong merge field in the document?
Answers: 2
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
Mathematics, 09.04.2021 04:00
question
Mathematics, 09.04.2021 04:00
Questions on the website: 13722362