input: 
  from typing import List
  
  
  def generate_pattern(size: int) -> None:
      """ Generate a pattern of '#' and spaces where in a size x size grid,
      '#' appears at coordinates (i, j) if (i + j) % 2 == 0.
      >>> generate_pattern(7)
      # # # 
       # # #
      # # # 
       # # #
      # # # 
       # # #
      # # # 
      """
      for i in range(size):
          for j in range(size):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()
  
output:     for i in range(size):
          for j in range(size):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()