Skip to content

3. Selection

In this problem, you’re asked to enter some APL code, including an APL symbol and the data (text or numbers) given to it. Your code will be tested by the APL Challenge system to check whether it gives the correct answer and uses the methods described below.

In APL, text must appear between single quotes ( ' ). For example, 'ABC' will give a result that looks like ABC.

You can select specific letters from a text by putting square brackets ( [] ) to the right of the text. Inside the square brackets, you put numbers that say which letters you want to get from the text. For example, 'ABCDE'[1] gives you the letter A because that’s the 1st letter of 'ABCDE'. Similarly, 'ABCDE'[5 2 2] gives you EBB, because:

  1. The 5th letter of 'ABCDE' is E
  2. The 2nd letter of 'ABCDE' is B
  3. The 2nd letter of 'ABCDE' is B

Write some APL code using square brackets that transforms 'DYALOG APL' into 'GO POLLY'.