Write a function which takes one parameter representing the dimensions of a checkered board. The board will always be square, so 5 means you will need a 5x5 board.

The dark squares will be represented by a unicode white square, while the light squares will be represented by a unicode black square (the opposite colours ensure the board doesn't look reversed on code wars' dark background). It should return a string of the board with a space in between each square and taking into account new lines. 

An even number should return a board that begins with a dark square. An odd number should return a board that begins with a light square.

The input is expected to be a whole number that's at least two, and returns false otherwise (Nothing in Haskell).

Examples:

```python
checkered_board(5)
```

returns the string
```
■ □ ■ □ ■
□ ■ □ ■ □
■ □ ■ □ ■
□ ■ □ ■ □
■ □ ■ □ ■
```

**There should be no trailing white space at the end of each line, or new line characters at the end of the string.**

**Note**   
Do not use HTML entities for the squares (e.g. `□` for white square) as the code doesn't consider it a valid square. A good way to check is if your solution prints a correct checker board on your local terminal.  

**Ruby note:**
CodeWars has encoding issues with rendered unicode in Ruby.
You'll need to use unicode source code (e.g. "\u25A0") instead of rendered unicode (e.g "■").

Difficulty: EASY
Tags: String algorithms

Fundamentals

Starter code:
def checkered_board(n):
	

Solutions:
def checkered_board(n):
	return isinstance(n, int) and n > 1 and '\n'.join((' '.join(('■' if (x + y) % 2 ^ n % 2 else '□' for y in range(n))) for x in range(n)))


def checkered_board(n):
	l = ['□', '■']
	return False if type(n) != int or n < 2 else '\n'.join((' '.join((l[(i + j + n) % 2] for i in range(n))) for j in range(n)))


def checkered_board(n):
	if not (isinstance(n, int) and n > 1):
		return False
	return '\n'.join((' '.join(('□■'[(n + i + j) % 2] for j in range(n))) for i in range(n)))


def checkered_board(n):
	if type(n) != int or n < 2:
		return False
	s1 = ' '.join(('■□'[i & 1] for i in range(n)))
	s2 = ' '.join(('□■'[i & 1] for i in range(n)))
	lines = [s1, s2] if n & 1 else [s2, s1]
	return '\n'.join((lines[i & 1] for i in range(n)))


def checkered_board(size):
	result = ''
	rows = []
	print(size, type(size))
	if not type(size) == int:
		return False
	if size < 2:
		return False
	if size % 2 == 0:
		a = '□'
		b = '■'
	else:
		a = '■'
		b = '□'
	for x in range(size):
		if x % 2 == 0:
			row = [a if x % 2 == 0 else b for x in range(size)]
		else:
			row = [b if x % 2 == 0 else a for x in range(size)]
		rows.append(' '.join(row))
		result = '\n'.join(rows)
	return result


def checkered_board(n):
	return '\n'.join((' '.join((['□■', '■□'][n % 2][j % 2 - i % 2] for i in range(n))) for j in range(n))) if type(n) is int and n > 1 else False


def checkered_board(n):
	if type(n) is not int or n < 2:
		return False
	return '\n'.join(map(lambda i: ' '.join(map(lambda j: '□' if (n - j + i) % 2 == 0 else '■', range(n))), range(n)))


checkered_board = lambda n: type(n) is int and n >= 2 and '\n'.join([' '.join([['□', '■'][(r + c + n) % 2] for r in range(n)]) for c in range(n)])