input: Write a function to generate a checkered pattern with '#' and spaces, where '#' appears if the sum of the row index and column index is even. If the input is a positive integer n, the output should be a n by n checkered pattern.
  def checkered_pattern(n):
      for i in range(n):
          for j in range(n):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()
  
  assert checkered_pattern(7)==None
  assert checkered_pattern(5)==None
  assert checkered_pattern(10)==None
output: def checkered_pattern(n):
      for i in range(n):
          for j in range(n):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()