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, 23.06.2019 22:30, ghari112345
Jamie has to enter the names, employee id’s, and income of a group of employees into a worksheet. which option will jamie use to describe the data
Answers: 3
image
Computers and Technology, 24.06.2019 00:40, ndurairajownkpq
What social factors affect your health
Answers: 3
image
Computers and Technology, 24.06.2019 02:00, sameh0425
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
image
Computers and Technology, 24.06.2019 16:50, Ameilasmickle15
How many types of string types does python support?
Answers: 1
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
Mathematics, 18.11.2020 19:00
Konu
Mathematics, 18.11.2020 19:00
Konu
Geography, 18.11.2020 19:00