input: Write a function that generates a 7x7 grid of characters where each character is a '#' if the sum of its row and column indices is even, and a space ' ' otherwise. Print the grid row by row.
  assert generate_grid()==None
  # Expected output:
  # # # # #
   # # # # #
  # # # # #
   # # # # #
  # # # # #
   # # # # #
  # # # # #
output: def generate_grid():
      for i in range(7):
          for j in range(7):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()