subject

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
Answers: 3

Other questions on the subject: Computers and Technology

image
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
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
Computers and Technology, 22.06.2019 16:00, eden1017
Why should characters such as / \ " ' * ; - ? [ ] ( ) ~ ! $ { } < > # @ & | space, tab, and newline be avoided in file names?
Answers: 2
image
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: