Answer the question based on the following information.
A robot moves on a graph sheet with X and Y-axis. The robot is moved by feeding it with a sequence of instructions. The different instructions that can be used in moving it, and their meanings are:
Instruction |
Meaning |
GOTO (x,y) |
Move to point with coordinates (x, y) no matter where you are currently. |
WALKX(p) |
Move parallel to the X-axis through a distance of p, in the positive direction if p is positive, and in the negative direction if p is negative. |
WALKY(p) |
Move parallel to the Y-axis through a distance of p, in the positive direction if p is positive, and in the negative direction if p is negative. |
The robot reaches point $(6, 6)$ when a sequence of three instructions is executed, the first of which is a GOTO(x,y) instruction, the second is WALKX$(2)$ and the third is WALKY$(4)$. What are the value of x and y?
- $2, 4$
- $0, 0$
- $4, 2$
- $2,2$