subject

[20 points] 3.3 Code Practice: Question 2 Ask the user to enter a number for red, green, and blue components of an RGB value, which takes a certain amount of red, green, and blue colors and produces a new color. Test the numbers that are input by the user and check that each value is between 0 and 255 (inclusive). If a color's value is outside of this range, print which color's number is not correct (e. g., "Red number is not correct" if the red value is 300). Multiple colors may be out of range. The order of the colors should be the same as the sample runs below; red, then green, then blue.

Hint: Since this lesson uses boolean operators, remember to use at least one boolean operator in each of your answers to receive full credit.

Sample Run 1
Enter the red: 150
Enter the green: 300
Enter the blue: 15
Sample Output 1
Green number is not correct.
Sample Run 2
Enter the red: 25
Enter the green: 124
Enter the blue: 105
Sample Output 2
Nothing is output if a user enters three numbers that are all within the range of 0 to 255.


[20 points] 3.3 Code Practice: Question 2

Ask the user to enter a number for red, green, and blue

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:00
Write a method named addall that could be placed inside the hashintset class. this method accepts another hashintset as a parameter and adds all elements from that set into the current set, if they are not already present. for example, if a set s1 contains [1, 2, 3] and another set s2 contains [1, 7, 3, 9], the call of s1.addall(s2); would change s1 to store [1, 2, 3, 7, 9] in some order. you are allowed to call methods on your set and/or the other set. do not modify the set passed in. this method should run in o(n) time where n is the number of elements in the parameter set passed in.
Answers: 2
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 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
question
Computers and Technology, 24.06.2019 00:40
What social factors affect your health
Answers: 3
You know the right answer?
[20 points] 3.3 Code Practice: Question 2 Ask the user to enter a number for red, green, and blue c...
Questions
question
Chemistry, 10.07.2019 00:00
Questions on the website: 13722361