1.

Which of the following functions results in an error?(a) turtle.shape(“turtle”)(b) turtle.shape(“square”)(c) turtle.shape(“triangle”)(d) turtle.shape(“rectangle”)The question was posed to me in my homework.Question is from Turtle Module in division Mapping Functions and Modules of Python

Answer»

The CORRECT choice is (d) turtle.shape(“RECTANGLE”)

Easy EXPLANATION - The functions shown above will change the ARROW to the shape mentioned. The functions turtle.shape(“turtle”), turtle.shape(“square”) and turtle.shape(“TRIANGLE”) are valid whereas the function turtle.shape(“rectangle”) is invalid.



Discussion

No Comment Found

Related InterviewSolutions