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

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:20
Write a select statement that returns product name, customer first name, customer last name, channel description, and amount sold for all the sales. make sure to returns sales even if there is no information on the customer, product, or channe
Answers: 2
question
Computers and Technology, 22.06.2019 09:50
17. implement the jvm dload instruction for the mic-2. it has a 1-byte index and pushes the local variable at this position onto the stack. then it pushes the next higher word onto the stack as well
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Knowing that the central portion of link bd has a uniform cross sectional area of 800 mm2 , determine the magnitude of the load p for which the normal stress in link bd is 50 mpa. (hint: link bd is a two-force member.) ans: p = 62.7 kn
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
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
question
Social Studies, 01.09.2019 01:30