input: Write a python function to generate a list of squares of numbers from 1 to n.
  assert squares(5) == [1, 4, 9, 16, 25]
  assert squares(3) == [1, 4, 9]
  assert squares(1) == [1]
output: def squares(n):
      return [i * i for i in range(1, n + 1)]