input: Write a function named generate_pattern that prints a 7x7 grid where each cell contains a '#' if the sum of its row and column indices is even, and a space if the sum is odd. The function takes no input parameters.
  assert generate_pattern()==None
  def generate_pattern():
      for i in range(7):
          for j in range(7):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()
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()