input: Write a python function to generate all unique pairs (i, j) where i < j and both i and j are within the range of n.
  assert generate_pairs(3) == [(0, 1), (0, 2), (1, 2)]
  assert generate_pairs(4) == [(0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)]
  assert generate_pairs(2) == [(0, 1)]
output: def generate_pairs(n):
      pairs = []
      for i in range(n):
          for j in range(i + 1, n):
              pairs.append((i, j))
      return pairs