(Solved):Here is a Python program : import turtle turtle.setup(500, 500) turtle.setworldcoordinates(0, 0, 255, 255) turtle.colormode(255) def change(x, y): r = max(0, min(255, int(x))) g = max(0,… View Answer…

 

Question

Here is a Python program :

import turtle

turtle.setup(500, 500)

turtle.setworldcoordinates(0, 0, 255, 255)

turtle.colormode(255)

def change(x, y):

r = max(0, min(255, int(x)))

g = max(0, min(255, int(y)))

b = max(0, min(255, int((x**2+y**2)**0.5)))

turtle.bgcolor(r, g, b)

turtle.onscreenclick(change)

turtle.done()

Question : Which one of the following colours cannot be shown in the turtle window?

– Magenta

– Red

– Black

– White

 

EXPERT ANSWER

Black.

Because of the combination of R, G, B produces the magenta, red, white but not black.

We are so grateful for the pleasure of

Scroll to top