input: Write a function that generates a checkerboard pattern of '#' and spaces, with the pattern repeating every two characters, using nested loops. The function should take an integer n as input, which represents the size of the checkerboard (n x n), and print the pattern to the console.
  assert checkerboard(7)
  assert checkerboard(4)
  assert checkerboard(0)
  assert checkerboard(10)
  assert checkerboard(1)
  
  where the function checkerboard should print a 7x7 checkerboard for the first assertion, a 4x4 checkerboard for the second, and so on. For the assertion with 0 as input, the function should print nothing.
output: def checkerboard(n):
      for i in range(n):
          for j in range(n):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()