Tuesday, December 13, 2011

You wish to calculate how far your robot spider has moved.?

You wish to calculate how far your robot spider has moved. You know its starting X position, its starting Y position, its current X position, and its current Y position. Determine appropriate variables (with types) and calculate the distance between the starting position and the final position. (Recall that Pythagoras's theorem is "the square of the hypotenuse is equal to the sum of the squares of the other two sides".)

No comments:

Post a Comment