![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 28.04.2021 19:20 cesarcastellan9
I am trying to figure out how to ask the user to input a choice between blue, green, or red and then output their choice for this next assignment by changing the filter. I have two separate ideas that I can't seem to combine correctly. any ideas? This is all in python code.
# Constants for the image
IMAGE_URL = "https://codehs. com/uploads/c709d869e62686611c1ac84 9367b3245"
IMAGE_WIDTH = 420
IMAGE_HEIGHT = 300
IMAGE_LOAD_TIME = 1000
image = Image(IMAGE_URL)
image. set_size(IMAGE_WIDTH, IMAGE_HEIGHT)
add(image)
"""
Filter that takes an image as a parameter
and applies a color filter, then returns the filtered image
"""
# asks the user to input a color of choice
user_color = input("Pick a color, blue, red or green:")
def custom_filter(image):
for x in range(image. get_width()):
for y in range(image. get_height()):
image. set_blue(x, y,-50)
image. set_red(x, y,100)
return image
def change_image():
global image
image = custom_filter(image)
timer. set_timeout(change_image, IMAGE_LOAD_TIME)
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 13:30, 21megoplin
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 15:30, gudon986732
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 18:00, ladyree8721
Which of the following physical laws can make the flow of water seem more realistic? a. motion b. gravity c. fluid dynamics d. thermodynamics
Answers: 2
You know the right answer?
I am trying to figure out how to ask the user to input a choice between blue, green, or red and then...
Questions in other subjects:
![Konu](/tpl/images/cats/en.png)
English, 25.01.2021 04:00
![Konu](/tpl/images/cats/ekonomika.png)
![Konu](/tpl/images/cats/geografiya.png)
Geography, 25.01.2021 04:00
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/pravo.png)
Law, 25.01.2021 04:00