subject

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.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:40
Kali, a python programmer, is using the turtle module to write the word β€œhello.” which code should she use to indicate the location to begin writing the word? a # pick up the turtle and move it to its starting location. b penup(-100, 200) goto() pendown() c penup() goto(-100, 200) pendown() d # pick up the turtle and move it to (-100, 200)
Answers: 2
question
Computers and Technology, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen too
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
What is the most popular genre of video games?
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
What are some settings you can control when formatting columns?
Answers: 1
You know the right answer?
Ask the user to enter a number for red, green, and blue components of an RGB value, which takes a ce...
Questions
Questions on the website: 13722359