input: Write a function to generate a pattern of '#' and spaces in a 7x7 grid, where each '#' is positioned at coordinates (i, j) such that (i + j) % 2 == 0. The function should print the pattern row by row.
  def generate_pattern():
      for i in range(7):
          for j in range(7):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()
  
  assert generate_pattern() == None
  assert generate_pattern() == None
output: def generate_pattern():
      for i in range(7):
          for j in range(7):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()