LearnPy Hub
← Comprehensions problems
Hard

Checkerboard

Read n and print an n×n checkerboard of # and ., starting with # in the top-left. Build each row with a comprehension.

Input

One integer n ≥ 1.

Output

n lines.

Sample 1

Input
4
Output
#.#.
.#.#
#.#.
.#.#

Sample 2

Input
1
Output
#
solution.py
Output appears here
Checkerboard · Python practice problem · LearnPy Hub