input: Write a function to generate a pattern of hash symbols and spaces based on the condition that for each pair of indices (i, j), if the sum of i and j is even, a hash symbol is printed, otherwise a space is printed. The pattern should span 7 rows and 7 columns.
  
  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()