![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 02.05.2021 03:00 wutwut2261
PLEASE HELP ME FIX THIS CODE.
I WANT IT TO HAVE USER INPUT TO CHANGE AND IMAGE FILTER TO BLUE RED OR GREEN.
user_color = input("What color would you like to paint the canvas, blue, red or green?:")
def user_red(pixel):
pixel[0] = 100 + pixel[0]
pixel[1] = 100 - pixel[1]
pixel[2] = 100 - pixel[2]
return pixel
def user_green(pixel):
pixel[0] = 100 + pixel[0]
pixel[1] = 100 - pixel[1]
pixel[2] = 100 - pixel[2]
return pixel
def user_blue(pixel):
pixel[0] = 100 + pixel[0]
pixel[1] = 100 - pixel[1]
pixel[2] = 100 - pixel[2]
return pixel
def custom_filter(image, user_color):
for x in range(image. get_width()):
for y in range(image. get_height()):
pixel = image. get_pixel(x, y)
new_colors = invert_pixel(pixel)
image. set_red(x, y, new_colors[0])
image. set_green(x, y, new_colors[1])
image. set_blue(x, y, new_colors[2])
return image
def change_image():
global image
image = custom_filter(image, user_color)
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)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 18:30
Technician a says that a shop towel should never be used to clean around the flange area before replacing an automatic transmission filter. technician b says that a dimpled transmission fluid pan can be repaired. who is right
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 02:30
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 07:50
Most shops require the technician to enter a starting and ending time on the repair order to track the actual time the vehicle was in the shop and closed out by the office. this time is referred to as _ time ? a. comeback b. ro c. cycle d. lead
Answers: 1
You know the right answer?
PLEASE HELP ME FIX THIS CODE.
I WANT IT TO HAVE USER INPUT TO CHANGE AND IMAGE FILTER TO BLUE RED...
Questions
![question](/tpl/images/cats/health.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 20.07.2019 18:10
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 20.07.2019 18:10
![question](/tpl/images/cats/ekonomika.png)
Business, 20.07.2019 18:10
![question](/tpl/images/cats/fizika.png)
Physics, 20.07.2019 18:10
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 20.07.2019 18:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
History, 20.07.2019 18:10
![question](/tpl/images/cats/mat.png)
Mathematics, 20.07.2019 18:10
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 20.07.2019 18:10
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.07.2019 18:10
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 20.07.2019 18:10
![question](/tpl/images/cats/istoriya.png)