The answer is B. The program prints:
[1, 4, 9, 16]

Why?
append adds one item to the end of the list each time round the loop. The loop runs for n = 1, 2, 3, 4.
Trace table
A trace table follows the program step by step. Here’s this one:
| n | n * n | results so far |
|---|---|---|
| 1 | 1 | [1] |
| 2 | 4 | [1, 4] |
| 3 | 9 | [1, 4, 9] |
| 4 | 16 | [1, 4, 9, 16] |
The code again
results = []
for n in range(1, 5):
results.append(n * n)
print(results)
Try it: change one number in the program and predict the new output before you run it.