1. 15
  1.  

  2. 5

    In an array language, we simply use vectors, so:

    ROBOT←2?100
    

    says that the robot is somewhere in two dimensions, within our 100,100 universe, and:

    NORTH←0 1
    SOUTH←0 ¯1
    EAST←1 0
    WEST←¯1 0
    

    Now if these were all objects, we’d have to define move to apply a Direction to something with a Position, but in an array language, + is a perfectly good definition of that method:

    ROBOT←ROBOT+NORTH+EAST
    

    Of course, array programmers might not bother with these names. With the coordinate system in-mind they might simply

    ROBOT←ROBOT+1 1