1.

Which of the following functions can be used to make the arrow black?(a) turtle.color(0,1,0)(b) turtle.color(1,0,0)(c) turtle.color(0,0,1)(d) turtle.color(0,0,0)The question was asked in an online interview.The above asked question is from Turtle Module in division Mapping Functions and Modules of Python

Answer»

Right choice is (d) turtle.color(0,0,0)

Explanation: The FUNCTION turtle.color(0,0,0) can CHANGE the colour of the arrow. The function turtle.color(0,1,0) will make the arrow green. The function turtle.color(1,0,0) will make the arrow red. The function turtle.color(0,0,1) will make the arrow BLUE. The function turtle.color(0,0,0) will make the arrow BLACK.



Discussion

No Comment Found

Related InterviewSolutions