A mad robot sets off towards the North East on a journey from the origin. It travels in stages by moving forward and then rotating on the spot. It follows these pseudo-code instructions:
$\quad$DISTANCE = 1000
$\quad$WHILE (DISTANCE > 0.001)
$\quad\quad$ROTATE(90, DEGREES, CLOCKWISE)
$\quad\quad$DISTANCE = DISTANCE / 2
Where does the robot explode?
Extension: Write a program such that the angle rotated and other factors in the problem are variables. Explore where the robot might end up.
Note: You might want to consider this problem in conjunction with the cool Twilgo site!