input: Write a function to add two matrices of different sizes.
  assert addMatrix([[1, 2], [1, 2], [2, 4]], [[1, 3], [2, 3]]) == [[2, 5], [3, 5], [2, 4]]
  assert addMatrix([[1, 2, 3], [4, 5, 6]], [[7, 8, 9], [10, 11, 12]]) == [[8, 10, 12], [14, 16, 18]]
  assert addMatrix([[1]], [[2]]) == [[3]]
output: def addMatrix(matrix1, matrix2):
      result = []
      for i in range(max(len(matrix1), len(matrix2))):
          row = []
          for j in range(max(len(matrix1[0]), len(matrix2[0]))):
              val1 = matrix1[i][j] if i < len(matrix1) and j < len(matrix1[0]) else 0
              val2 = matrix2[i][j] if i < len(matrix2) and j < len(matrix2[0]) else 0
              row.append(val1 + val2)
          result.append(row)
      return result