input: Write a function to produce a visual pattern of alternating hash symbols and spaces by iterating through two nested loops, with the outer loop iterating from 0 to 6 and the inner loop also iterating from 0 to 6. For each pair of indices (i, j) from the loops, print a hash symbol if the sum of the indices is even, otherwise print a space. After each iteration of the inner loop, print a newline character.
  assert print_pattern()=='#######\n #######\n#######\n #######\n#######\n #######\n#######\n'
output: def print_pattern():
      for i in range(7):
          for j in range(7):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()