input: Write a python function to generate an n x n 2D array with alternating True and False values.
  assert generate_alternating_2d_array(3) == [[True, False, True], [False, True, False], [True, False, True]]
  assert generate_alternating_2d_array(4) == [[True, False, True, False], [False, True, False, True], [True, False, True, False], [False, True, False, True]]
  assert generate_alternating_2d_array(5) == [[True, False, True, False, True], [False, True, False, True, False], [True, False, True, False, True], [False, True, False, True, False], [True, False, True, False, True]]
output: def generate_alternating_2d_array(n):
      return [[(i + j) % 2 == 0 for j in range(n)] for i in range(n)]