1.

The command used to set only the x coordinate of the turtle at 45 units is:(a) reset(45)(b) setx(45)(c) xset(45)(d) xreset(45)The question was posed to me during an online interview.Question is from Turtle Module in chapter Mapping Functions and Modules of Python

Answer»

The correct CHOICE is (b) setx(45)

EXPLANATION: The COMMAND setx(45) is used to set the x coordinate of the turtle. Similarly, the command sety() is used to set the y coordinate of the turtle. The function RESET() TAKES two values as arguments, one for the x-coordinate and the other for the y-coordinate.



Discussion

No Comment Found

Related InterviewSolutions