input: Write a function to generate a checkerboard pattern of a given size. The function should take an integer `size` as input and print a checkerboard pattern using '#' and spaces. If the `size` is even, the pattern should start and end with '#', and if it is odd, it should start with '#' but end with a space. If the `size` is 0, it should print nothing.
  assert checkerboard(7)==None
  assert checkerboard(6)==None
  assert checkerboard(0)==None
output: def checkerboard(size):
      for i in range(size):
          if i % 2 == 0:
              print('# ' * (size // 2) + ('#' if size % 2 != 0 else ''))
          else:
              print(' #' * (size // 2) + (' ' if size % 2 != 0 else ''))